Package com.gengoai.hermes.format
Interface CoNLLColumnProcessor
-
- All Known Implementing Classes:
CategoryProcessor
,DependencyLinkProcessor
,DependencyRelationProcessor
,IndexProcessor
,IOBFieldProcessor
,LemmaProcessor
,MorphologicalFeatureProcessor
,NamedEntityProcessor
,NoOptProcessor
,PhraseChunkProcessor
,POSFieldProcessor
,SuperSenseProcessor
,UPOSProcessor
,WordProcessor
public interface CoNLLColumnProcessor
Interface defining how to process a column from a CoNLL formatted document.- Author:
- David B. Bracewell
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default 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 formatdefault void
updateRow(CoNLLRow row, String part)
Updates a CoNLL row with this field
-
-
-
Method Detail
-
getFieldName
String getFieldName()
Gets the name of the field- Returns:
- the field name
-
processInput
void processInput(Document document, List<CoNLLRow> documentRows, Map<Tuple2<Integer,Integer>,Long> sentenceIndexToAnnotationId)
Processes a set of CoNLL rows making up a document- Parameters:
document
- the documentdocumentRows
- the CoNLL rows making up the documentsentenceIndexToAnnotationId
- the index of the token in the sentence to annotation id
-
processOutput
String processOutput(HString document, Annotation token, int index)
Generates output data in CoNLL format- Parameters:
document
- theHString
representing the document.token
- the tokenindex
- the index- Returns:
- the string
-
-