Package opennlp.tools.util.featuregen
Class FeatureGeneratorAdapter
- java.lang.Object
-
- opennlp.tools.util.featuregen.FeatureGeneratorAdapter
-
- All Implemented Interfaces:
AdaptiveFeatureGenerator
- Direct Known Subclasses:
AdditionalContextFeatureGenerator,BigramNameFeatureGenerator,BrownBigramFeatureGenerator,BrownTokenClassFeatureGenerator,BrownTokenFeatureGenerator,CharacterNgramFeatureGenerator,DictionaryFeatureGenerator,DocumentBeginFeatureGenerator,FastTokenClassFeatureGenerator,InSpanGenerator,OutcomePriorFeatureGenerator,PrefixFeatureGenerator,SentenceFeatureGenerator,SuffixFeatureGenerator,TokenClassFeatureGenerator,TokenFeatureGenerator,TokenPatternFeatureGenerator,TrigramNameFeatureGenerator,WordClusterFeatureGenerator
public abstract class FeatureGeneratorAdapter extends java.lang.Object implements AdaptiveFeatureGenerator
This class provides empty implementations of some of the optional methods inAdditionalContextFeatureGeneratorto make implementing feature generators easier.
-
-
Constructor Summary
Constructors Constructor Description FeatureGeneratorAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearAdaptiveData()Informs the feature generator that the context of the adaptive data (typically a document) is no longer valid.voidupdateAdaptiveData(java.lang.String[] tokens, java.lang.String[] outcomes)Informs the feature generator that the specified tokens have been classified with the corresponding set of specified outcomes.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface opennlp.tools.util.featuregen.AdaptiveFeatureGenerator
createFeatures
-
-
-
-
Method Detail
-
updateAdaptiveData
public void updateAdaptiveData(java.lang.String[] tokens, java.lang.String[] outcomes)Description copied from interface:AdaptiveFeatureGeneratorInforms the feature generator that the specified tokens have been classified with the corresponding set of specified outcomes.- Specified by:
updateAdaptiveDatain interfaceAdaptiveFeatureGenerator- Parameters:
tokens- The tokens of the sentence or other text unit which has been processed.outcomes- The outcomes associated with the specified tokens.
-
clearAdaptiveData
public void clearAdaptiveData()
Description copied from interface:AdaptiveFeatureGeneratorInforms the feature generator that the context of the adaptive data (typically a document) is no longer valid.- Specified by:
clearAdaptiveDatain interfaceAdaptiveFeatureGenerator
-
-