Package opennlp.tools.postag
Interface POSContextGenerator
-
- All Superinterfaces:
BeamSearchContextGenerator<String>
- All Known Implementing Classes:
ConfigurablePOSContextGenerator
,DefaultPOSContextGenerator
public interface POSContextGenerator extends BeamSearchContextGenerator<String>
Interface for aBeamSearchContextGenerator
used in POS tagging.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]
getContext(int index, String[] tokens, String[] prevTags, Object[] additionalContext)
Returns the context for making a postag decision at the specified tokenindex
given the specifiedtokens
and previoustags
.
-
-
-
Method Detail
-
getContext
String[] getContext(int index, String[] tokens, String[] prevTags, Object[] additionalContext)
Returns the context for making a postag decision at the specified tokenindex
given the specifiedtokens
and previoustags
.- Specified by:
getContext
in interfaceBeamSearchContextGenerator<String>
- Parameters:
index
- The index of the token for which the context is provided.tokens
- The token sequence representing a sentence.prevTags
- The tags assigned to the previous words in the sentence.additionalContext
- The context for additional information.- Returns:
- The context for making a postag decision at the specified token
index
given the specifiedtokens
and previoustags
.
-
-