protected class FlatLinguist.GState
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
GState(GrammarNode node)
Creates a GState for a grammar node
|
Modifier and Type | Method and Description |
---|---|
protected void |
attachState(SentenceHMMState prevState,
SentenceHMMState nextState,
float logLanguageProbablity,
float logInsertionProbablity)
Attaches one SentenceHMMState as a child to another, the transition has the given probability
|
void |
collectContexts()
Collects the right contexts for this node and pushes this nodes ending context into the next next set of
nodes.
|
void |
connect()
Connect up all of the GStates.
|
void |
expand()
Expands each GState into the sentence HMM States
|
protected SentenceHMMState |
expandUnit(UnitState unit)
Expands the unit into a set of HMMStates.
|
SentenceHMMState |
getEntryPoint()
Gets the context-free entry point to this state
|
protected int |
getLeftContextSize()
Returns the size of the left context.
|
protected int |
getRightContextSize()
Returns the size of the right context.
|
java.util.Collection<SearchState> |
getStates()
Returns all of the states maintained by this gstate
|
java.lang.String |
toString()
Returns the string representation of the object
|
protected GState(GrammarNode node)
node
- the grammar nodepublic SentenceHMMState getEntryPoint()
public void collectContexts()
public void expand()
protected int getLeftContextSize()
protected int getRightContextSize()
protected SentenceHMMState expandUnit(UnitState unit)
unit
- the unit to expandpublic void connect()
Note that for a task with 1000 words this will involve checking on the order of 35,000,000 connections and making about 2,000,000 connections
protected void attachState(SentenceHMMState prevState, SentenceHMMState nextState, float logLanguageProbablity, float logInsertionProbablity)
prevState
- the parent statenextState
- the child statelogLanguageProbablity
- the language probability of transition in the LogMath log domainlogInsertionProbablity
- insertion probability of transition in the LogMath log domainpublic java.util.Collection<SearchState> getStates()
public java.lang.String toString()
toString
in class java.lang.Object