public interface Lexicon
| Modifier and Type | Method and Description |
|---|---|
void |
addAddendum(java.lang.String word,
java.lang.String partOfSpeech,
java.lang.String[] phones)
Adds a word to the addenda.
|
java.lang.String[] |
getPhones(java.lang.String word,
java.lang.String partOfSpeech)
Gets the phone list for a given word.
|
java.lang.String[] |
getPhones(java.lang.String word,
java.lang.String partOfSpeech,
boolean useLTS)
Gets the phone list for a given word.
|
boolean |
isLoaded()
Determines if this lexicon is loaded.
|
boolean |
isSyllableBoundary(java.util.List syllablePhones,
java.lang.String[] wordPhones,
int currentWordPhone)
Determines if the
currentWordPhone represents a
new syllable boundary. |
void |
load()
Loads this lexicon.
|
void |
removeAddendum(java.lang.String word,
java.lang.String partOfSpeech)
Removes a word from the addenda.
|
java.lang.String[] getPhones(java.lang.String word,
java.lang.String partOfSpeech)
null is returned. The
partOfSpeech is implementation dependent, but
null always matches.word - the word to findpartOfSpeech - the part of speech or nulljava.lang.String[] getPhones(java.lang.String word,
java.lang.String partOfSpeech,
boolean useLTS)
null is returned. The
partOfSpeech is implementation dependent, but
null always matches.word - the word to findpartOfSpeech - the part of speech or nulluseLTS - whether to use the letter-to-sound rules when
the word is not in the lexicon.void addAddendum(java.lang.String word,
java.lang.String partOfSpeech,
java.lang.String[] phones)
word - the word to addpartOfSpeech - the part of speech or nullvoid removeAddendum(java.lang.String word,
java.lang.String partOfSpeech)
word - the word to addpartOfSpeech - the part of speechboolean isSyllableBoundary(java.util.List syllablePhones,
java.lang.String[] wordPhones,
int currentWordPhone)
currentWordPhone represents a
new syllable boundary.syllablePhones - the phones in the current syllable so farwordPhones - the phones for the whole wordcurrentWordPhone - the word phone in questiontrue if the phone is a new boundaryvoid load() throws java.io.IOException
java.io.IOException - if an error occurs while loadingboolean isLoaded()
true if the lexicon is loaded