|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents the generic interface to an N-Gram language model.
Note that all probabilities are in LogMath log base, except as otherwise noted.
Field Summary | |
static java.lang.String |
PROP_DICTIONARY
The Sphinx Property specifying the dictionary to use |
static java.lang.String |
PROP_FORMAT
The SphinxProperty specifying the format of the language model. |
static java.lang.String |
PROP_FORMAT_DEFAULT
The default value of PROP_FORMAT. |
static java.lang.String |
PROP_LOCATION
The Sphinx Property specifying the location of the language model. |
static java.lang.String |
PROP_LOCATION_DEFAULT
The default value of PROP_LOCATION. |
static java.lang.String |
PROP_MAX_DEPTH
The Sphinx Property specifying the maximum depth reported by the language model (from a getMaxDepth()) call. |
static int |
PROP_MAX_DEPTH_DEFAULT
The default value for PROP_MAX_DEPTH. |
static java.lang.String |
PROP_UNIGRAM_WEIGHT
The Sphinx Property specifying the unigram weight |
static float |
PROP_UNIGRAM_WEIGHT_DEFAULT
The default value for 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)
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 |
getVocabulary()
Returns the set of words in the lanaguage model. |
void |
start()
Called before a recognition |
void |
stop()
Called after a recognition |
Methods inherited from interface edu.cmu.sphinx.util.props.Configurable |
getName, newProperties, register |
Field Detail |
public static final java.lang.String PROP_FORMAT
public static final java.lang.String PROP_FORMAT_DEFAULT
public static final java.lang.String PROP_LOCATION
public static final java.lang.String PROP_LOCATION_DEFAULT
public static final java.lang.String PROP_UNIGRAM_WEIGHT
public static final float PROP_UNIGRAM_WEIGHT_DEFAULT
public static final java.lang.String PROP_MAX_DEPTH
public static final int PROP_MAX_DEPTH_DEFAULT
public static final java.lang.String PROP_DICTIONARY
Method Detail |
public void allocate() throws java.io.IOException
java.io.IOException
public void deallocate()
public void start()
public void stop()
public float getProbability(WordSequence wordSequence)
wordSequence
- the wordSequence
public float getSmear(WordSequence wordSequence)
wordSequence
- the word sequence
public java.util.Set getVocabulary()
public int getMaxDepth()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |