public interface Dictionary extends Configurable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_ADDENDA
The property for the custom dictionary file paths.
|
static java.lang.String |
PROP_DICTIONARY
The property for the dictionary file path.
|
static java.lang.String |
PROP_FILLER_DICTIONARY
The property for the filler dictionary file path.
|
static java.lang.String |
PROP_G2P_MAX_PRONUNCIATIONS
The property for the g2p model file path.
|
static java.lang.String |
PROP_G2P_MODEL_PATH
The property for the g2p model file path.
|
static java.lang.String |
PROP_UNIT_MANAGER
The property that defines the name of the unit manager that is used to convert strings to Unit objects
|
static java.lang.String |
PROP_WORD_REPLACEMENT
The property that specifies the word to substitute when a lookup fails to find the word in the
dictionary.
|
static java.lang.String |
SENTENCE_END_SPELLING
Spelling of the sentence end word.
|
static java.lang.String |
SENTENCE_START_SPELLING
Spelling of the sentence start word.
|
static java.lang.String |
SILENCE_SPELLING
Spelling of the 'word' that marks a silence
|
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)
Returns a Word object based on the spelling and its classification.
|
newProperties
static final java.lang.String SENTENCE_START_SPELLING
static final java.lang.String SENTENCE_END_SPELLING
static final java.lang.String SILENCE_SPELLING
@S4String static final java.lang.String PROP_DICTIONARY
@S4String(defaultValue="") static final java.lang.String PROP_G2P_MODEL_PATH
@S4Integer(defaultValue=1) static final java.lang.String PROP_G2P_MAX_PRONUNCIATIONS
@S4String static final java.lang.String PROP_FILLER_DICTIONARY
@S4String(mandatory=false) static final java.lang.String PROP_WORD_REPLACEMENT
@S4Component(type=UnitManager.class, defaultClass=UnitManager.class) static final java.lang.String PROP_UNIT_MANAGER
@S4String(mandatory=false) static final java.lang.String PROP_ADDENDA
EIGHT OW T SIX(2) Z IH K S ZERO(3) Z IY Rl AH ELEVEN EH L EH V AH N
Word getWord(java.lang.String text)
text
- the spelling of the word of interest.Pronunciation
Word getSentenceStartWord()
Word getSentenceEndWord()
Word getSilenceWord()
Word[] getFillerWords()
void allocate() throws java.io.IOException
java.io.IOException
- if there is trouble loading the dictionaryvoid deallocate()