|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.linguist.lextree.LexTreeLinguist
public class LexTreeLinguist
A linguist that can represent large vocabularies efficiently. This class implements the Linguist interface. The main
role of any linguist is to represent the search space for the decoder. The initial state in the search space can be
retrieved by a SearchManager via a call to getInitialSearchState. This method returns a SearchState.
Successor states can be retrieved via calls to SearchState.getSuccessors().. There are a number of
search state subinterfaces that are used to indicate different types of states in the search space:
getSearchStateOrder can be used to retrieve the order of state returned by the linguist.
Depending on the vocabulary size and topology, the search space represented by the linguist may include a very large
number of states. Some linguists will generate the search states dynamically, that is, the object representing a
particular state in the search space is not created until it is needed by the SearchManager. SearchManagers often
need to be able to determine if a particular state has been entered before by comparing states. Because SearchStates
may be generated dynamically, the SearchState.equals() call (as opposed to the reference equals '=='
method) should be used to determine if states are equal. The states returned by the linguist will generally provide
very efficient implementations of equals and hashCode. This will allow a SearchManager to
maintain collections of states in HashMaps efficiently.
LexTeeLinguist Characteristics
Some characteristics of this linguist:
| Nested Class Summary | |
|---|---|
class |
LexTreeLinguist.LexTreeEndUnitState
Represents a unit in the search space |
class |
LexTreeLinguist.LexTreeEndWordState
Represents the final end of utterance word |
class |
LexTreeLinguist.LexTreeHMMState
Represents a HMM state in the search space |
class |
LexTreeLinguist.LexTreeNonEmittingHMMState
Represents a non emitting hmm state |
class |
LexTreeLinguist.LexTreeUnitState
Represents a unit in the search space |
class |
LexTreeLinguist.LexTreeWordState
Represents a word state in the search space |
| Field Summary | |
|---|---|
static java.lang.String |
PROP_ACOUSTIC_MODEL
A sphinx property used to define the acoustic model to use when building the search graph |
static java.lang.String |
PROP_ADD_FILLER_WORDS
Property that controls whether filler words are automatically added to the vocabulary |
static java.lang.String |
PROP_CACHE_SIZE
A sphinx property that defines the size of the arc cache (zero to disable the cache). |
static java.lang.String |
PROP_DICTIONARY
Property that defines the dictionary to use for this grammar |
static java.lang.String |
PROP_FULL_WORD_HISTORIES
Sphinx property used to determine whether or not the gstates are dumped. * A sphinx property that determines whether or not full word histories are used to determine when two states are equal. |
static java.lang.String |
PROP_GENERATE_UNIT_STATES
Property to control whether or not the linguist will generate unit states. |
static java.lang.String |
PROP_GRAMMAR
A sphinx property used to define the grammar to use when building the search graph |
static java.lang.String |
PROP_LANGUAGE_MODEL
A sphinx property for the language model to be used by this grammar |
static java.lang.String |
PROP_LOG_MATH
Sphinx property that defines the name of the logmath to be used by this search manager. |
static java.lang.String |
PROP_UNIGRAM_SMEAR_WEIGHT
A sphinx property that determines the weight of the smear |
static java.lang.String |
PROP_UNIT_MANAGER
A sphinx property used to define the unit manager to use when building the search graph |
static java.lang.String |
PROP_WANT_UNIGRAM_SMEAR
A sphinx property that determines whether or not unigram probabilities are smeared through the lex tree |
| Fields inherited from interface edu.cmu.sphinx.linguist.Linguist |
|---|
PROP_FILLER_INSERTION_PROBABILITY, PROP_LANGUAGE_WEIGHT, PROP_SILENCE_INSERTION_PROBABILITY, PROP_UNIT_INSERTION_PROBABILITY, PROP_WORD_INSERTION_PROBABILITY |
| Constructor Summary | |
|---|---|
LexTreeLinguist()
|
|
LexTreeLinguist(AcousticModel acousticModel,
LogMath logMath,
UnitManager unitManager,
LanguageModel languageModel,
Dictionary dictionary,
boolean fullWordHistories,
boolean wantUnigramSmear,
double wordInsertionProbability,
double silenceInsertionProbability,
double fillerInsertionProbability,
double unitInsertionProbability,
float languageWeight,
boolean addFillerWords,
boolean generateUnitStates,
float unigramSmearWeight,
int arcCacheSize)
|
|
| Method Summary | |
|---|---|
void |
allocate()
Allocates the linguist. |
void |
deallocate()
Deallocates the linguist. |
Dictionary |
getDictionary()
|
LanguageModel |
getLanguageModel()
Retrieves the language model for this linguist |
SearchGraph |
getSearchGraph()
Retrieves search graph. |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured. |
void |
startRecognition()
Called before a recognition |
void |
stopRecognition()
Called after a recognition |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@S4Component(type=Grammar.class) public static final java.lang.String PROP_GRAMMAR
@S4Component(type=AcousticModel.class) public static final java.lang.String PROP_ACOUSTIC_MODEL
@S4Component(type=UnitManager.class,
defaultClass=UnitManager.class)
public static final java.lang.String PROP_UNIT_MANAGER
@S4Component(type=LogMath.class) public static final java.lang.String PROP_LOG_MATH
@S4Boolean(defaultValue=true) public static final java.lang.String PROP_FULL_WORD_HISTORIES
@S4Component(type=LanguageModel.class) public static final java.lang.String PROP_LANGUAGE_MODEL
@S4Component(type=Dictionary.class) public static final java.lang.String PROP_DICTIONARY
@S4Integer(defaultValue=0) public static final java.lang.String PROP_CACHE_SIZE
@S4Boolean(defaultValue=false) public static final java.lang.String PROP_ADD_FILLER_WORDS
@S4Boolean(defaultValue=false) public static final java.lang.String PROP_GENERATE_UNIT_STATES
@S4Boolean(defaultValue=false) public static final java.lang.String PROP_WANT_UNIGRAM_SMEAR
@S4Double(defaultValue=1.0) public static final java.lang.String PROP_UNIGRAM_SMEAR_WEIGHT
| Constructor Detail |
|---|
public LexTreeLinguist(AcousticModel acousticModel,
LogMath logMath,
UnitManager unitManager,
LanguageModel languageModel,
Dictionary dictionary,
boolean fullWordHistories,
boolean wantUnigramSmear,
double wordInsertionProbability,
double silenceInsertionProbability,
double fillerInsertionProbability,
double unitInsertionProbability,
float languageWeight,
boolean addFillerWords,
boolean generateUnitStates,
float unigramSmearWeight,
int arcCacheSize)
public LexTreeLinguist()
| 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
Linguist
allocate in interface Linguistjava.io.IOException - if an IO error occurspublic void deallocate()
Linguist
deallocate in interface Linguistpublic SearchGraph getSearchGraph()
Linguist
getSearchGraph in interface Linguistpublic void startRecognition()
startRecognition in interface Linguistpublic void stopRecognition()
stopRecognition in interface Linguistpublic LanguageModel getLanguageModel()
public Dictionary getDictionary()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||