|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.linguist.language.classes.ClassPresentingDictionary
public class ClassPresentingDictionary
The only purpose of this class is to present all classes as words in the getWord() method. This dictionary must be injected to a class LM as a dictionary, otherwise classes will be treated as OOVs.
| Field Summary | |
|---|---|
static java.lang.String |
PROP_CLASS_MAP
|
static java.lang.String |
PROP_WORD_DICTIONARY
|
| Fields inherited from interface edu.cmu.sphinx.linguist.dictionary.Dictionary |
|---|
PROP_ADD_SIL_ENDING_PRONUNCIATION, PROP_ALLOW_MISSING_WORDS, PROP_CREATE_MISSING_WORDS, PROP_DICTIONARY, PROP_FILLER_DICTIONARY, PROP_UNIT_MANAGER, PROP_WORD_REPLACEMENT, SENTENCE_END_SPELLING, SENTENCE_START_SPELLING, SILENCE_SPELLING |
| Constructor Summary | |
|---|---|
ClassPresentingDictionary()
|
|
ClassPresentingDictionary(ClassMap classMap,
Dictionary wordDictionary)
|
|
| Method Summary | |
|---|---|
void |
allocate()
Allocates the dictionary |
void |
deallocate()
Deallocates the dictionary |
Word[] |
getFillerWords()
Gets the set of all filler words in the dictionary |
WordClassification[] |
getPossibleWordClassifications()
Returns the set of all possible word classifications for this dictionary. |
Word |
getSentenceEndWord()
Returns the sentence end word. |
Word |
getSentenceStartWord()
Returns the sentence start word. |
Word |
getSilenceWord()
Returns the silence word. |
Word |
getWord(java.lang.String text)
This method disguises all classes as words. |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
@S4Component(type=ClassMap.class) public static final java.lang.String PROP_CLASS_MAP
@S4Component(type=Dictionary.class) public static final java.lang.String PROP_WORD_DICTIONARY
| Constructor Detail |
|---|
public ClassPresentingDictionary(ClassMap classMap,
Dictionary wordDictionary)
public ClassPresentingDictionary()
| 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
Dictionary
allocate in interface Dictionaryjava.io.IOException - if there is trouble loading the dictionarypublic void deallocate()
Dictionary
deallocate in interface Dictionarypublic Word getWord(java.lang.String text)
getWord in interface Dictionarytext - the spelling of the word of interest.
Pronunciationpublic Word getSentenceStartWord()
Dictionary
getSentenceStartWord in interface Dictionarypublic Word getSentenceEndWord()
Dictionary
getSentenceEndWord in interface Dictionarypublic Word getSilenceWord()
Dictionary
getSilenceWord in interface Dictionarypublic WordClassification[] getPossibleWordClassifications()
Dictionary
getPossibleWordClassifications in interface Dictionarypublic Word[] getFillerWords()
Dictionary
getFillerWords in interface Dictionarypublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||