Package opennlp.tools.tokenize
Class DefaultTokenContextGenerator
java.lang.Object
opennlp.tools.tokenize.DefaultTokenContextGenerator
- All Implemented Interfaces:
TokenContextGenerator
Generate events for maxent decisions for tokenization.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a default context generator for tokenizer.DefaultTokenContextGenerator(Set<String> inducedAbbreviations) Creates a default context generator for tokenizer. -
Method Summary
Modifier and TypeMethodDescriptionString[]getContext(String sentence, int index) Returns an array of features for the specified sentence string at the specified index.
-
Constructor Details
-
DefaultTokenContextGenerator
public DefaultTokenContextGenerator()Creates a default context generator for tokenizer. -
DefaultTokenContextGenerator
Creates a default context generator for tokenizer.- Parameters:
inducedAbbreviations- the induced abbreviations
-
-
Method Details
-
getContext
Description copied from interface:TokenContextGeneratorReturns an array of features for the specified sentence string at the specified index.- Specified by:
getContextin interfaceTokenContextGenerator- Parameters:
sentence- The string for a sentence.index- The index to consider splitting as a token.- Returns:
- an array of features for the specified sentence string at the specified index.
-