|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.linguist.language.classes.ClassBasedLanguageModel
public class ClassBasedLanguageModel
An LM that computes a probability of a word sequence by converting words to classes and asking the class-based probability from a delegate LM.
| Field Summary | |
|---|---|
static java.lang.String |
PROP_CLASS_LANGUAGE_MODEL
Sphinx property that defines the classLanguageModel component. |
static java.lang.String |
PROP_CLASS_MAP
Sphinx property that defines the classMap component. |
static java.lang.String |
PROP_LOG_MATH
Sphinx 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 |
| Constructor Summary | |
|---|---|
ClassBasedLanguageModel()
|
|
ClassBasedLanguageModel(ClassMap classMap,
LanguageModel classLM,
LogMath logMath)
|
|
| 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 n-gram 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=LogMath.class) public static final java.lang.String PROP_LOG_MATH
@S4Component(type=LanguageModel.class) public static final java.lang.String PROP_CLASS_LANGUAGE_MODEL
@S4Component(type=ClassMap.class) public static final java.lang.String PROP_CLASS_MAP
| Constructor Detail |
|---|
public ClassBasedLanguageModel(ClassMap classMap,
LanguageModel classLM,
LogMath logMath)
public ClassBasedLanguageModel()
| 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)
LanguageModel
getProbability in interface LanguageModelwordSequence - the wordSequence
public float getSmear(WordSequence wordSequence)
getSmear in interface LanguageModelwordSequence - the word sequence
public java.util.Set<java.lang.String> getVocabulary()
LanguageModel
getVocabulary in interface LanguageModelpublic int getMaxDepth()
getMaxDepth in interface LanguageModel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||