|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.linguist.flat.GrammarPoint
public class GrammarPoint
Manages a particular point in a grammar. The GrammarPoint is used to manage the look-ahead for generating right-contexts. Since we haven't built the HMM tree yet, looking ahead can be difficult. The GrammarPoint class points to a particular unit within a pronunciation/word/grammar. From a particular grammar point, it is possible to get the set of next grammar points.
| Constructor Summary | |
|---|---|
GrammarPoint(GrammarNode node)
Creates a grammar node that points to the first unit of the first pronunciation of the first word of the given grammar node |
|
GrammarPoint(GrammarNode node,
int alternativeIndex,
int wordIndex,
int pronunciationIndex,
int unitIndex)
Creates a GrammarPoint that points to a fully specified unit |
|
GrammarPoint(PronunciationState state,
int which)
Creates a GrammarPoint that corresponds to the given unit of the given pronunciation |
|
GrammarPoint(SentenceHMMState state)
Creates a grammar point that points to the given unit of the given pronunciation state. |
|
| Method Summary | |
|---|---|
java.util.List<Unit[]> |
getRightContexts(int size,
boolean startWithCurrent,
int maxContexts)
Gets all of the right contexts for this grammar point. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GrammarPoint(SentenceHMMState state)
state - the pronunciation of interestpublic GrammarPoint(GrammarNode node)
node - the grammar node of interest
public GrammarPoint(PronunciationState state,
int which)
state - the pronunciation statewhich - the index of the unit
public GrammarPoint(GrammarNode node,
int alternativeIndex,
int wordIndex,
int pronunciationIndex,
int unitIndex)
node - the grammar nodewordIndex - the index of the word in the nodepronunciationIndex - the index of the pronunciation in the word.unitIndex - the index of the unit in the pronunciation| Method Detail |
|---|
public java.util.List<Unit[]> getRightContexts(int size,
boolean startWithCurrent,
int maxContexts)
size - the size of each context returnedstartWithCurrent - include the current state in the contextmaxContexts - the maxium number of right contexts to return
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||