|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.linguist.flat.FlatLinguist
A simple form of the linguist. The flat linguist takes a Grammar graph (as returned by the underlying, configurable grammar), and generates a search graph for this grammar. It makes the following simplifying assumptions:
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_DUMP_GSTATES
Sphinx property used to determine whether or not the gstates are dumped. |
static boolean |
PROP_DUMP_GSTATES_DEFAULT
The default value for the PROP_DUMP_GSTATES property |
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 used for the CI phone loop. |
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 | |
FlatLinguist()
|
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_LOG_MATH
public static final java.lang.String PROP_DUMP_GSTATES
public static final boolean PROP_DUMP_GSTATES_DEFAULT
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 java.lang.String PROP_PHONE_LOOP_ACOUSTIC_MODEL
public static final java.lang.String PROP_PHONE_INSERTION_PROBABILITY
public static final double PROP_PHONE_INSERTION_PROBABILITY_DEFAULT
public static final double PROP_OUT_OF_GRAMMAR_PROBABILITY_DEFAULT
Constructor Detail |
public FlatLinguist()
Method Detail |
public SearchGraph getSearchGraph()
getSearchGraph
in interface Linguist
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 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 |