|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.linguist.language.ngram.KeywordOptimizerModel
public class KeywordOptimizerModel
| Field Summary | |
|---|---|
java.util.HashMap<java.lang.String,java.lang.Float> |
keywordProbs
|
static java.lang.String |
PROP_PARENT
Sphinx property that defines the parent language model. |
| Fields inherited from interface edu.cmu.sphinx.linguist.language.ngram.LanguageModel |
|---|
PROP_DICTIONARY, PROP_FORMAT, PROP_LOCATION, PROP_MAX_DEPTH, PROP_UNIGRAM_WEIGHT |
| Constructor Summary | |
|---|---|
KeywordOptimizerModel()
|
|
KeywordOptimizerModel(LanguageModel parent)
|
|
| Method Summary | |
|---|---|
void |
allocate()
Create the language model |
void |
deallocate()
Deallocate resources allocated to this language model |
int |
getMaxDepth()
Returns the maximum depth of the language model |
float |
getProbability(WordSequence wordSequence)
Gets the ngram probability of the word sequence represented by the word list |
float |
getSmear(WordSequence wordSequence)
Gets the smear term for the given wordSequence |
java.util.Set<java.lang.String> |
getVocabulary()
Returns the set of words in the language model. |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured. |
void |
start()
Called before a recognition |
void |
stop()
Called after a recognition |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@S4Component(type=LanguageModel.class) public static final java.lang.String PROP_PARENT
public java.util.HashMap<java.lang.String,java.lang.Float> keywordProbs
| Constructor Detail |
|---|
public KeywordOptimizerModel(LanguageModel parent)
public KeywordOptimizerModel()
| Method Detail |
|---|
public void newProperties(PropertySheet ps)
throws PropertyException
Configurable
newProperties in interface Configurableps - a property sheet holding the new data
PropertyException - if there is a problem with the properties.
public void allocate()
throws java.io.IOException
LanguageModel
allocate in interface LanguageModeljava.io.IOExceptionpublic void deallocate()
LanguageModel
deallocate in interface LanguageModelpublic void start()
start in interface LanguageModelpublic void stop()
stop in interface LanguageModelpublic float getProbability(WordSequence wordSequence)
getProbability in interface LanguageModelwordSequence - the word sequence
public float getSmear(WordSequence wordSequence)
getSmear in interface LanguageModelwordSequence - the word sequence
public int getMaxDepth()
getMaxDepth in interface LanguageModelpublic java.util.Set<java.lang.String> getVocabulary()
getVocabulary in interface LanguageModel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||