opennlp.tools.util.featuregen
Class FeatureGeneratorAdapter

java.lang.Object
  extended by opennlp.tools.util.featuregen.FeatureGeneratorAdapter
All Implemented Interfaces:
AdaptiveFeatureGenerator
Direct Known Subclasses:
AdditionalContextFeatureGenerator, CharacterNgramFeatureGenerator, DictionaryFeatureGenerator, FastTokenClassFeatureGenerator, InSpanGenerator, OutcomePriorFeatureGenerator, PrefixFeatureGenerator, SentenceFeatureGenerator, SuffixFeatureGenerator, TokenClassFeatureGenerator, TokenFeatureGenerator, TokenPatternFeatureGenerator

public abstract class FeatureGeneratorAdapter
extends Object
implements AdaptiveFeatureGenerator

This class provides empty implementations of some of the optional methods in AdditionalContextFeatureGenerator to make implementing feature generators easier.


Constructor Summary
FeatureGeneratorAdapter()
           
 
Method Summary
 void clearAdaptiveData()
          Informs the feature generator that the context of the adaptive data (typically a document) is no longer valid.
 void updateAdaptiveData(String[] tokens, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface opennlp.tools.util.featuregen.AdaptiveFeatureGenerator
createFeatures
 

Constructor Detail

FeatureGeneratorAdapter

public FeatureGeneratorAdapter()
Method Detail

updateAdaptiveData

public void updateAdaptiveData(String[] tokens,
                               String[] outcomes)
Description copied from interface: AdaptiveFeatureGenerator
Informs the feature generator that the specified tokens have been classified with the corresponding set of specified outcomes.

Specified by:
updateAdaptiveData in interface AdaptiveFeatureGenerator
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: AdaptiveFeatureGenerator
Informs the feature generator that the context of the adaptive data (typically a document) is no longer valid.

Specified by:
clearAdaptiveData in interface AdaptiveFeatureGenerator


Copyright © 2010. All Rights Reserved.