|
|||||||||
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 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 |
java.util.logging.Logger |
getLogger()
Used for reporting errors and warnings during loading |
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 |
---|
newProperties |
Field Detail |
---|
@S4String(defaultValue="arpa") static final java.lang.String PROP_FORMAT
static final java.lang.String PROP_FORMAT_DEFAULT
@S4String(defaultValue=".") static final java.lang.String PROP_LOCATION
static final java.lang.String PROP_LOCATION_DEFAULT
@S4Double(defaultValue=1.0) static final java.lang.String PROP_UNIGRAM_WEIGHT
static final float PROP_UNIGRAM_WEIGHT_DEFAULT
@S4Integer(defaultValue=-1) static final java.lang.String PROP_MAX_DEPTH
static final int PROP_MAX_DEPTH_DEFAULT
@S4Component(type=Dictionary.class) static final java.lang.String PROP_DICTIONARY
Method Detail |
---|
void allocate() throws java.io.IOException
java.io.IOException
void deallocate()
void start()
void stop()
float getProbability(WordSequence wordSequence)
wordSequence
- the wordSequence
float getSmear(WordSequence wordSequence)
wordSequence
- the word sequence
java.util.Set getVocabulary()
int getMaxDepth()
java.util.logging.Logger getLogger()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |