edu.stanford.nlp.tagger.maxent
Class TaggerFeature

java.lang.Object
  |
  +--edu.stanford.nlp.maxent.iis.Feature
        |
        +--edu.stanford.nlp.tagger.maxent.TaggerFeature

public class TaggerFeature
extends Feature

Holds a Tagger Feature for the loglinear model. Tagger Features are binary valued, and indexed in a particular way.


Field Summary
 
Fields inherited from class edu.stanford.nlp.maxent.iis.Feature
hashValues, indexedValues, sum, valuesI
 
Constructor Summary
TaggerFeature()
           
TaggerFeature(int start, int end, FeatureKey key)
           
 
Method Summary
 double ftiled()
           
 double getVal(int index)
          Get the value at the index-ed non zero value pair (x,y)
 double getVal(int x, int y)
          This is rarely used because it is slower and requires initHashVals() to be called beforehand to initiallize the hashValues
 int getX(int index)
           
 int getY(int index)
           
 int getYTag()
           
 int len()
           
 void read(InDataStreamFile rF)
           
 void save(OutDataStreamFile rF)
           
 
Methods inherited from class edu.stanford.nlp.maxent.iis.Feature
initHashVals, isEmpty, print, print, setSum, sumValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaggerFeature

public TaggerFeature(int start,
                     int end,
                     FeatureKey key)

TaggerFeature

public TaggerFeature()
Method Detail

getVal

public double getVal(int index)
Description copied from class: Feature
Get the value at the index-ed non zero value pair (x,y)

Overrides:
getVal in class Feature

getY

public int getY(int index)
Overrides:
getY in class Feature
Returns:
the outcome y of the index-th (x,y) pair

len

public int len()
Overrides:
len in class Feature

getX

public int getX(int index)
Overrides:
getX in class Feature
Returns:
the history x of the index-th (x,y) pair

getYTag

public int getYTag()

getVal

public double getVal(int x,
                     int y)
Description copied from class: Feature
This is rarely used because it is slower and requires initHashVals() to be called beforehand to initiallize the hashValues

Overrides:
getVal in class Feature

save

public void save(OutDataStreamFile rF)
Overrides:
save in class Feature

read

public void read(InDataStreamFile rF)
Overrides:
read in class Feature

ftiled

public double ftiled()
Overrides:
ftiled in class Feature
Returns:
the emptirical expectation of the feature


Stanford NLP Group