edu.stanford.nlp.tagger.maxent
Class Extractors

java.lang.Object
  extended by edu.stanford.nlp.tagger.maxent.Extractors
All Implemented Interfaces:
Serializable

public class Extractors
extends Object
implements Serializable

Maintains a set of featuror extractors and applies them.

Author:
Kristina Toutanova
See Also:
Serialized Form

Constructor Summary
Extractors()
           
 
Method Summary
 boolean equals(History h, History h1)
           
 String extract(int i, History h)
          Extract using the i'th extractor.
 int getSize()
           
 void init(Extractor[] extrs)
          Set the extractors from an array.
 int leftContext()
          Find maximum left context of extractors.
static void main(String[] args)
          Prints out the pair of Extractors objects found in the file that is the first and only argument.
 void read(String filename)
           
 int rightContext()
          Find maximum right context of extractors.
 void save(String filename)
           
 void set(Extractor e, int index)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Extractors

public Extractors()
Method Detail

init

public void init(Extractor[] extrs)
Set the extractors from an array.

Parameters:
extrs - The array of extractors. It is copied in this init.

extract

public String extract(int i,
                      History h)
Extract using the i'th extractor.

Parameters:
i - The extractor to use
h - The history to extract from
Returns:
String The feature value

set

public void set(Extractor e,
                int index)

equals

public boolean equals(History h,
                      History h1)

leftContext

public int leftContext()
Find maximum left context of extractors. Used in TagInference to decide windows for dynamic programming.

Returns:
The maximum of the left contexts used by all extractors.

rightContext

public int rightContext()
Find maximum right context of extractors. Used in TagInference to decide windows for dynamic programming.

Returns:
The maximum of the right contexts used by all extractors.

getSize

public int getSize()

save

public void save(String filename)

read

public void read(String filename)

toString

public String toString()
Overrides:
toString in class Object

main

public static void main(String[] args)
Prints out the pair of Extractors objects found in the file that is the first and only argument.

Parameters:
args - Filename of extractors file (standardly written with .ex extension)


Stanford NLP Group