|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.linguist.language.grammar.Grammar
edu.cmu.sphinx.linguist.language.grammar.SimpleWordListGrammar
Defines a grammar based upon a list of words in a file. The format of the file is just one word per line. For example, for an isolated digits grammar the file will simply look like:
zero one two three four five six seven eight nineThe path to the file is defined by the
PROP_PATH
property. If the PROP_LOOP
property is true,
the grammar created will be a looping grammar.
Using the above digits grammar example,
setting PROP_LOOP to true will make it a connected-digits grammar.
All probabilities are maintained in LogMath log base.
Field Summary | |
static java.lang.String |
PROP_LOG_MATH
Sphinx property that defines the logMath component. |
static java.lang.String |
PROP_LOOP
Sphinx property that if true, indicates that this is a looping grammar |
static boolean |
PROP_LOOP_DEFAULT
The default value for PROP_LOOP. |
static java.lang.String |
PROP_PATH
Sphinx property that defines the location of the word list grammar |
static java.lang.String |
PROP_PATH_DEFAULT
The default value for PROP_PATH. |
Fields inherited from class edu.cmu.sphinx.linguist.language.grammar.Grammar |
PROP_ADD_FILLER_WORDS, PROP_ADD_FILLER_WORDS_DEFAULT, PROP_ADD_SIL_WORDS, PROP_ADD_SIL_WORDS_DEFAULT, PROP_DICTIONARY, PROP_OPTIMIZE_GRAMMAR, PROP_OPTIMIZE_GRAMMAR_DEFAULT, PROP_SHOW_GRAMMAR, PROP_SHOW_GRAMMAR_DEFAULT |
Constructor Summary | |
SimpleWordListGrammar()
|
Method Summary | |
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. |
Methods inherited from class edu.cmu.sphinx.linguist.language.grammar.Grammar |
allocate, deallocate, dumpGrammar, dumpRandomSentences, dumpRandomSentences, dumpStatistics, getGrammarNodes, getInitialNode, getName, getNumNodes, getRandomSentence |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.cmu.sphinx.util.props.Configurable |
getName |
Field Detail |
public static final java.lang.String PROP_PATH
public static final java.lang.String PROP_PATH_DEFAULT
public static final java.lang.String PROP_LOOP
public static final boolean PROP_LOOP_DEFAULT
public static final java.lang.String PROP_LOG_MATH
Constructor Detail |
public SimpleWordListGrammar()
Method Detail |
public void register(java.lang.String name, Registry registry) throws PropertyException
Configurable
register
in interface Configurable
register
in class Grammar
PropertyException
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
newProperties
in class Grammar
PropertyException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |