|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.linguist.dictionary.FullDictionary
public class FullDictionary
Creates a dictionary by reading in an ASCII-based Sphinx-3 format dictionary. Each line of the dictionary specifies the word, followed by spaces or tab, followed by the pronuncation (by way of the list of phones) of the word. Each word can have more than one pronunciations. For example, a digits dictionary will look like:
ONE HH W AH N ONE(2) W AH N TWO T UW THREE TH R IY FOUR F AO R FIVE F AY V SIX S IH K S SEVEN S EH V AH N EIGHT EY T NINE N AY N ZERO Z IH R OW ZERO(2) Z IY R OW OH OWIn the above example, the words "one" and "zero" have two pronunciations each. This dictionary will read in all the words and its pronunciation(s) at startup. Therefore, if the dictionary is big, it will take longer to load and will consume more memory.
| Field Summary |
|---|
| 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_LOCATION, PROP_UNIT_MANAGER, PROP_WORD_REPLACEMENT, SENTENCE_END_SPELLING, SENTENCE_START_SPELLING, SILENCE_SPELLING |
| Constructor Summary | |
|---|---|
FullDictionary()
|
|
| Method Summary | |
|---|---|
void |
allocate()
Allocates the dictionary |
void |
deallocate()
Deallocates the dictionary |
java.net.URL |
getFillerDictionaryFile()
Get the filler dictionary file |
Word[] |
getFillerWords()
Gets the set of all filler words in the dictionary |
java.lang.String |
getName()
|
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)
Returns a Word object based on the spelling and its classification. |
java.net.URL |
getWordDictionaryFile()
Get the word dictionary file |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured. |
java.lang.String |
toString()
Returns a string representation of this FullDictionary in alphabetical order. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FullDictionary()
| 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 java.lang.String getName()
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.
Wordpublic Word getSentenceStartWord()
getSentenceStartWord in interface Dictionarypublic Word getSentenceEndWord()
getSentenceEndWord in interface Dictionarypublic Word getSilenceWord()
getSilenceWord in interface Dictionarypublic WordClassification[] getPossibleWordClassifications()
getPossibleWordClassifications in interface Dictionarypublic java.net.URL getWordDictionaryFile()
public java.net.URL getFillerDictionaryFile()
public java.lang.String toString()
toString in class java.lang.Objectpublic Word[] getFillerWords()
getFillerWords in interface Dictionary
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||