edu.cmu.sphinx.linguist.language.grammar
Class LMGrammar
java.lang.Object
edu.cmu.sphinx.linguist.language.grammar.Grammar
edu.cmu.sphinx.linguist.language.grammar.LMGrammar
- All Implemented Interfaces:
- GrammarInterface, Configurable
public class LMGrammar
- extends Grammar
Defines a simple grammar based upon a language model. It generates one grammar nodeper word. This
grammar can deal with unigram and bigram grammars of up to 1000 or so words. Note that all probabilities are in the
log math domain.
|
Field Summary |
static java.lang.String |
PROP_LANGUAGE_MODEL
A sphinx property for the language model to be used by this grammar |
|
Method Summary |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured. |
| Methods inherited from class edu.cmu.sphinx.linguist.language.grammar.Grammar |
allocate, deallocate, dumpGrammar, dumpRandomSentences, dumpRandomSentences, dumpStatistics, getDictionary, getGrammarNodes, getInitialNode, getNumNodes, getRandomSentence |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROP_LANGUAGE_MODEL
@S4Component(type=LanguageModel.class)
public static final java.lang.String PROP_LANGUAGE_MODEL
- A sphinx property for the language model to be used by this grammar
- See Also:
- Constant Field Values
LMGrammar
public LMGrammar(LanguageModel languageModel,
boolean showGrammar,
boolean optimizeGrammar,
boolean addSilenceWords,
boolean addFillerWords,
Dictionary dictionary)
LMGrammar
public LMGrammar()
newProperties
public void newProperties(PropertySheet ps)
throws PropertyException
- Description copied from interface:
Configurable
- This method is called when this configurable component needs to be reconfigured.
- Specified by:
newProperties in interface Configurable- Overrides:
newProperties in class Grammar
- Parameters:
ps - a property sheet holding the new data
- Throws:
PropertyException - if there is a problem with the properties.