public class ClassPresentingDictionary extends java.lang.Object implements Dictionary
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_CLASS_MAP |
static java.lang.String |
PROP_WORD_DICTIONARY |
PROP_ADDENDA, PROP_DICTIONARY, PROP_FILLER_DICTIONARY, PROP_G2P_MAX_PRONUNCIATIONS, PROP_G2P_MODEL_PATH, PROP_UNIT_MANAGER, PROP_WORD_REPLACEMENT, SENTENCE_END_SPELLING, SENTENCE_START_SPELLING, SILENCE_SPELLING
Constructor and Description |
---|
ClassPresentingDictionary() |
ClassPresentingDictionary(ClassMap classMap,
Dictionary wordDictionary) |
Modifier and Type | Method and Description |
---|---|
void |
allocate()
Allocates the dictionary
|
void |
deallocate()
Deallocates the dictionary
|
Word[] |
getFillerWords()
Gets the set of all filler words in the 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() |
@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
public ClassPresentingDictionary(ClassMap classMap, Dictionary wordDictionary)
public ClassPresentingDictionary()
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
ps
- a property sheet holding the new dataPropertyException
- if there is a problem with the properties.public void allocate() throws java.io.IOException
Dictionary
allocate
in interface Dictionary
java.io.IOException
- if there is trouble loading the dictionarypublic void deallocate()
Dictionary
deallocate
in interface Dictionary
public Word getWord(java.lang.String text)
getWord
in interface Dictionary
text
- the spelling of the word of interest.Pronunciation
public Word getSentenceStartWord()
Dictionary
getSentenceStartWord
in interface Dictionary
public Word getSentenceEndWord()
Dictionary
getSentenceEndWord
in interface Dictionary
public Word getSilenceWord()
Dictionary
getSilenceWord
in interface Dictionary
public Word[] getFillerWords()
Dictionary
getFillerWords
in interface Dictionary
public java.lang.String toString()
toString
in class java.lang.Object