edu.stanford.nlp.ie.hmm
Class State

java.lang.Object
  |
  +--edu.stanford.nlp.ie.hmm.State
All Implemented Interfaces:
Serializable

public class State
extends Object
implements Serializable

Class to model a single state in an HMM.

See Also:
Serialized Form

Field Summary
static int BKGRNDIDX
           
 EmitMap emit
           
static int FINISHIDX
           
static int FINISHTYPE
           
static int STARTIDX
          This variable indicates a state numbering in a state array, not a state type (unlike the TYPE variables above).
static int STARTTYPE
           
 double[] transition
           
 int type
          An integer type for a state, giving equivalence classes of states.
 
Constructor Summary
State(int numStates)
          Creates new state, initializes transitions and type to background.
State(int type, EmitMap emit, double[] transition)
          Creates new state, initializes transitions and type.
State(int type, EmitMap emit, int numStates)
          Creates new state, initializes transitions and type.
 
Method Summary
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public int type
An integer type for a state, giving equivalence classes of states. Types run from -2 to (num_types - 1). -2 is end state (no emissions). -1 is start state (no emissions). In general, types < 0 have no emissions and special transitions. In the IE world, type 0 is the background state, types >= 1 are target types, and types after the end of target types are other special non-target types. This is a classification of states not a numbering. It is used for the restricted EM used in the HMM module. If this feature is not desired, one can simply give all tokens and states the same type, and then regular EM will be done (give them a type between 0 and 1000 inclusive to avoid warning messages!).


STARTTYPE

public static final int STARTTYPE
See Also:
Constant Field Values

FINISHTYPE

public static final int FINISHTYPE
See Also:
Constant Field Values

emit

public EmitMap emit

transition

public double[] transition

STARTIDX

public static final int STARTIDX
This variable indicates a state numbering in a state array, not a state type (unlike the TYPE variables above).

See Also:
Constant Field Values

FINISHIDX

public static final int FINISHIDX
See Also:
Constant Field Values

BKGRNDIDX

public static final int BKGRNDIDX
See Also:
Constant Field Values
Constructor Detail

State

public State(int numStates)
Creates new state, initializes transitions and type to background.


State

public State(int type,
             EmitMap emit,
             int numStates)
Creates new state, initializes transitions and type.


State

public State(int type,
             EmitMap emit,
             double[] transition)
Creates new state, initializes transitions and type.

Method Detail

toString

public String toString()
Overrides:
toString in class Object


Stanford NLP Group