Class InSpanGenerator
java.lang.Object
opennlp.tools.util.featuregen.InSpanGenerator
- All Implemented Interfaces:
opennlp.tools.util.featuregen.AdaptiveFeatureGenerator
public class InSpanGenerator
extends Object
implements opennlp.tools.util.featuregen.AdaptiveFeatureGenerator
Generates features if the tokens are recognized by the provided
TokenNameFinder.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInSpanGenerator(String prefix, opennlp.tools.namefind.TokenNameFinder finder) Initializes aInSpanGeneratorinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateFeatures(List<String> features, String[] tokens, int index, String[] preds) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface opennlp.tools.util.featuregen.AdaptiveFeatureGenerator
clearAdaptiveData, updateAdaptiveData
-
Constructor Details
-
InSpanGenerator
Initializes aInSpanGeneratorinstance.- Parameters:
prefix- The prefix is used to distinguish the generated features from features generated by other instances ofInSpanGenerator. Must not benull.finder- TheTokenNameFinderused to detect the names. Must not benull.
-
-
Method Details
-
createFeatures
-