|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.linguist.dflat.DynamicFlatLinguist
A simple form of the linguist. It makes the following simplifying assumptions: 1) Zero or one word per grammar node 2) No fan-in allowed ever 3) No composites (yet) 4) Only Unit, HMMState, and pronunciation states (and the initial/final grammar state are in the graph (no word, alternative or grammar states attached). 5) Only valid tranisitions (matching contexts) are allowed 6) No tree organization of units 7) Branching grammar states are allowed This is a dynamic version of the flat linguist that is more efficient in terms of startup time and overall footprint Note that all probabilties are maintained in the log math domain
Field Summary | |
static java.lang.String |
PROP_ACOUSTIC_MODEL
A sphinx property used to define the acoustic model to use when building the search graph |
static java.lang.String |
PROP_ADD_OUT_OF_GRAMMAR_BRANCH
Sphinx property that specifies whether to add a branch for detecting out-of-grammar utterances. |
static boolean |
PROP_ADD_OUT_OF_GRAMMAR_BRANCH_DEFAULT
Default value of PROP_ADD_OUT_OF_GRAMMAR_BRANCH. |
static java.lang.String |
PROP_GRAMMAR
A sphinx property used to define the grammar to use when building the search graph |
static java.lang.String |
PROP_LOG_MATH
Sphinx property that defines the name of the logmath to be used by this search manager. |
static java.lang.String |
PROP_OUT_OF_GRAMMAR_PROBABILITY
Sphinx property for the probability of entering the out-of-grammar branch. |
static double |
PROP_OUT_OF_GRAMMAR_PROBABILITY_DEFAULT
The default value for PROP_OUT_OF_GRAMMAR_PROBABILITY. |
static java.lang.String |
PROP_PHONE_INSERTION_PROBABILITY
Sphinx property for the probability of inserting a CI phone in the out-of-grammar ci phone loop |
static double |
PROP_PHONE_INSERTION_PROBABILITY_DEFAULT
Default value for PROP_PHONE_INSERTION_PROBABILITY |
static java.lang.String |
PROP_PHONE_LOOP_ACOUSTIC_MODEL
Sphinx property for the acoustic model to use to build the phone loop that detects out of grammar utterances. |
static java.lang.String |
PROP_UNIT_MANAGER
A sphinx property used to define the unit manager to use when building the search graph |
Constructor Summary | |
DynamicFlatLinguist()
|
Method Summary | |
void |
allocate()
Allocates the linguist. |
void |
deallocate()
Deallocates the linguist. |
LogMath |
getLogMath()
Returns the LogMath used. |
float |
getLogSilenceInsertionProbability()
Returns the log silence insertion probability. |
java.lang.String |
getName()
Retrieves the name for this configurable component |
SearchGraph |
getSearchGraph()
Returns the search graph |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component has new data. |
void |
register(java.lang.String name,
Registry registry)
Register my properties. |
void |
startRecognition()
Called before a recognition |
void |
stopRecognition()
Called after a recognition |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROP_GRAMMAR
public static final java.lang.String PROP_UNIT_MANAGER
public static final java.lang.String PROP_ACOUSTIC_MODEL
public static final java.lang.String PROP_ADD_OUT_OF_GRAMMAR_BRANCH
public static final boolean PROP_ADD_OUT_OF_GRAMMAR_BRANCH_DEFAULT
public static final java.lang.String PROP_OUT_OF_GRAMMAR_PROBABILITY
public static final double PROP_OUT_OF_GRAMMAR_PROBABILITY_DEFAULT
public static final java.lang.String PROP_PHONE_INSERTION_PROBABILITY
public static final double PROP_PHONE_INSERTION_PROBABILITY_DEFAULT
public static final java.lang.String PROP_PHONE_LOOP_ACOUSTIC_MODEL
public static final java.lang.String PROP_LOG_MATH
Constructor Detail |
public DynamicFlatLinguist()
Method Detail |
public void register(java.lang.String name, Registry registry) throws PropertyException
Configurable
register
in interface Configurable
name
- the name of the componentregistry
- the registry for this component
PropertyException
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
ps
- a property sheet holding the new data
PropertyException
- if there is a problem with the properties.public SearchGraph getSearchGraph()
getSearchGraph
in interface Linguist
public java.lang.String getName()
Configurable
getName
in interface Configurable
public void allocate() throws java.io.IOException
Linguist
Implementor's Note - A well written linguist will allow allocate to be called multiple times without harm. This will allow a linguist to be shared by multiple search managers.
allocate
in interface Linguist
java.io.IOException
- if an IO error occurspublic void deallocate()
Linguist
Implementor's Note - if the linguist is being shared by multiple searches, the deallocate should only actually deallocate things when the last call to deallocate is made. Two approaches for dealing with this: (1) Keep an allocation counter that is incremented during allocate and decremented during deallocate. Only when the counter reaches zero should the actually deallocation be performed. (2) Do nothing in dellocate - just the the GC take care of things
deallocate
in interface Linguist
public void startRecognition()
startRecognition
in interface Linguist
public void stopRecognition()
stopRecognition
in interface Linguist
public LogMath getLogMath()
public float getLogSilenceInsertionProbability()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |