edu.stanford.nlp.tagger.maxent
Class Extractor

java.lang.Object
  |
  +--edu.stanford.nlp.tagger.maxent.Extractor
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ExtractorAllTaggerOutputs, ExtractorFollowing2WClass, ExtractorFollowingWClass, ExtractorLastVerb, ExtractorLVdist, ExtractorMorpho, ExtractorOutputTag, ExtractorParticles, ExtractorParticlesChris

public class Extractor
extends Object
implements Serializable

This class serves as the base class for classes which extract relevant information from a history to give it to the features. Every feature has an associated extractor or may be more. GlobalHolder keeps all the extractors; two histories are considered equal if all extractors return equal values for them. The main functionality of the Extractors is provided by the method extract which takes a History as an argument. The Extractor looks at the history and takes out something important for the features - e.g. specific words and tags at specific positions or some function of the History. The histories x are effectively vectors of values, with each dimension being the output of some extractor.

See Also:
Serialized Form

Constructor Summary
Extractor()
           
Extractor(int position, boolean isTag)
          This constructor creates an extractor which extracts either the tag or the word from position position in the history.
 
Method Summary
 boolean isPopulated(TaggerFeature f)
           
 boolean Precondition(String tag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Extractor

public Extractor()

Extractor

public Extractor(int position,
                 boolean isTag)
This constructor creates an extractor which extracts either the tag or the word from position position in the history.

Parameters:
position - The position of the thing to be extracted. This is relative to the current word. For example, position 0 will be the current word, * -1 will be the word before +1 will be the word after, etc.
isTag - If true this means that the POS tag is exracted from position, otherwise the word is extracted.
Method Detail

Precondition

public boolean Precondition(String tag)

isPopulated

public boolean isPopulated(TaggerFeature f)


Stanford NLP Group