|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LanguageModel
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 property specifying the dictionary to use |
static java.lang.String |
PROP_FORMAT
The property specifying the format of the language model. |
static java.lang.String |
PROP_LOCATION
The property specifying the location of the language model. |
static java.lang.String |
PROP_MAX_DEPTH
The Sphinx Property specifying the maximum depth reported by the language model (from a getMaxDepth()) call. |
static java.lang.String |
PROP_UNIGRAM_WEIGHT
The property specifying the 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 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 |
start()
Called before a recognition |
void |
stop()
Called after a recognition |
| Methods inherited from interface edu.cmu.sphinx.util.props.Configurable |
|---|
newProperties |
| Field Detail |
|---|
@S4String(defaultValue="arpa") static final java.lang.String PROP_FORMAT
@S4String(defaultValue=".") static final java.lang.String PROP_LOCATION
@S4Double(defaultValue=1.0) static final java.lang.String PROP_UNIGRAM_WEIGHT
@S4Integer(defaultValue=-1) static final java.lang.String PROP_MAX_DEPTH
@S4Component(type=Dictionary.class) static final java.lang.String PROP_DICTIONARY
| Method Detail |
|---|
void allocate()
throws java.io.IOException
java.io.IOExceptionvoid deallocate()
void start()
void stop()
float getProbability(WordSequence wordSequence)
wordSequence - the wordSequence
float getSmear(WordSequence wordSequence)
wordSequence - the word sequence
java.util.Set<java.lang.String> getVocabulary()
int getMaxDepth()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||