Package com.gengoai.hermes.format.conll
Class NoOptProcessor
- java.lang.Object
-
- com.gengoai.hermes.format.conll.NoOptProcessor
-
- All Implemented Interfaces:
CoNLLColumnProcessor
@MetaInfServices public final class NoOptProcessor extends Object implements CoNLLColumnProcessor
No Operation Processor- Author:
- David B. Bracewell
-
-
Constructor Summary
Constructors Constructor Description NoOptProcessor()
-
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 formatvoid
updateRow(CoNLLRow row, String part)
Updates a CoNLL row with this field
-
-
-
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
-
updateRow
public void updateRow(CoNLLRow row, String part)
Description copied from interface:CoNLLColumnProcessor
Updates a CoNLL row with this field- Specified by:
updateRow
in interfaceCoNLLColumnProcessor
- Parameters:
row
- the row to updatepart
- the part to update
-
-