|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.linguist.language.ngram.NetworkLanguageModel
public class NetworkLanguageModel
| Field Summary | |
|---|---|
static java.lang.String |
PROP_HOST
The property specifying the host of the language model server. |
static java.lang.String |
PROP_LOG_MATH
Sphinx property that defines the logMath component. |
static java.lang.String |
PROP_PORT
The property specifying the port of the language model server. |
| 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 | |
|---|---|
NetworkLanguageModel()
|
|
| 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
@S4String(defaultValue="localhost") public static final java.lang.String PROP_HOST
@S4Integer(defaultValue=2525) public static final java.lang.String PROP_PORT
| Constructor Detail |
|---|
public NetworkLanguageModel()
| 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 int getMaxDepth()
LanguageModel
getMaxDepth in interface LanguageModelpublic float getProbability(WordSequence wordSequence)
LanguageModel
getProbability in interface LanguageModelwordSequence - the 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 void start()
LanguageModel
start in interface LanguageModelpublic void stop()
LanguageModel
stop in interface LanguageModel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||