|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.linguist.language.ngram.InterpolatedLanguageModel
public class InterpolatedLanguageModel
Simple interpolated LM implementation.
| Field Summary | |
|---|---|
static java.lang.String |
PROP_LANGUAGE_MODEL_WEIGHTS
The property that defines the language models weights |
static java.lang.String |
PROP_LANGUAGE_MODELS
The property that defines the language models to be interpolated. |
static java.lang.String |
PROP_LOG_MATH
The property that defines the logMath component. |
| Fields inherited from interface edu.cmu.sphinx.linguist.language.ngram.LanguageModel |
|---|
PROP_DICTIONARY, PROP_FORMAT, PROP_LOCATION, PROP_MAX_DEPTH, PROP_UNIGRAM_WEIGHT |
| 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)
Calculates probability p = w[1]*p[1] + w[2]*p[2] + ... |
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=LogMath.class) public static final java.lang.String PROP_LOG_MATH
@S4ComponentList(type=LanguageModel.class) public static final java.lang.String PROP_LANGUAGE_MODELS
@S4StringList public static final java.lang.String PROP_LANGUAGE_MODEL_WEIGHTS
| 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 wordSequence
LanguageModel.getProbability(edu.cmu.sphinx.linguist.WordSequence)public float getSmear(WordSequence wordSequence)
LanguageModel
getSmear in interface LanguageModelwordSequence - the word sequence
public java.util.Set<java.lang.String> getVocabulary()
LanguageModel
getVocabulary in interface LanguageModelpublic int getMaxDepth()
LanguageModel
getMaxDepth in interface LanguageModel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||