Package com.gengoai.hermes.format.conll
Class LemmaProcessor
- java.lang.Object
-
- com.gengoai.hermes.format.conll.LemmaProcessor
-
- All Implemented Interfaces:
CoNLLColumnProcessor
@MetaInfServices public class LemmaProcessor extends Object implements CoNLLColumnProcessor
Processes lemma information in CoNLL Files- Author:
- David B. Bracewell
-
-
Constructor Summary
Constructors Constructor Description LemmaProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFieldName()
Gets the name of the fieldvoid
processInput(Document document, List<CoNLLRow> documentRows, Map<Tuple2<Integer,Integer>,Long> sentenceIndexToAnnotationId)
Processes a set of CoNLL rows making up a documentString
processOutput(HString document, Annotation token, int index)
Generates output data in CoNLL format-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.gengoai.hermes.format.CoNLLColumnProcessor
updateRow
-
-
-
-
Method Detail
-
getFieldName
public String getFieldName()
Description copied from interface:CoNLLColumnProcessor
Gets the name of the field- Specified by:
getFieldName
in interfaceCoNLLColumnProcessor
- Returns:
- the field name
-
processInput
public void processInput(Document document, List<CoNLLRow> documentRows, Map<Tuple2<Integer,Integer>,Long> sentenceIndexToAnnotationId)
Description copied from interface:CoNLLColumnProcessor
Processes a set of CoNLL rows making up a document- Specified by:
processInput
in interfaceCoNLLColumnProcessor
- Parameters:
document
- the documentdocumentRows
- the CoNLL rows making up the documentsentenceIndexToAnnotationId
- the index of the token in the sentence to annotation id
-
processOutput
public String processOutput(HString document, Annotation token, int index)
Description copied from interface:CoNLLColumnProcessor
Generates output data in CoNLL format- Specified by:
processOutput
in interfaceCoNLLColumnProcessor
- Parameters:
document
- theHString
representing the document.token
- the tokenindex
- the index- Returns:
- the string
-
-