public interface Lexicon
Modifier and Type | Method and Description |
---|---|
void |
addAddendum(String word,
String partOfSpeech,
String[] phones)
Adds a word to the addenda.
|
String[] |
getPhones(String word,
String partOfSpeech)
Gets the phone list for a given word.
|
String[] |
getPhones(String word,
String partOfSpeech,
boolean useLTS)
Gets the phone list for a given word.
|
boolean |
isLoaded()
Determines if this lexicon is loaded.
|
boolean |
isSyllableBoundary(List syllablePhones,
String[] wordPhones,
int currentWordPhone)
Determines if the
currentWordPhone represents a
new syllable boundary. |
void |
load()
Loads this lexicon.
|
void |
removeAddendum(String word,
String partOfSpeech)
Removes a word from the addenda.
|
String[] getPhones(String word, String partOfSpeech)
null
is returned. The
partOfSpeech
is implementation dependent, but
null
always matches.word
- the word to findpartOfSpeech
- the part of speech or null
String[] getPhones(String word, 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 null
useLTS
- whether to use the letter-to-sound rules when
the word is not in the lexicon.void addAddendum(String word, String partOfSpeech, String[] phones)
word
- the word to addpartOfSpeech
- the part of speech or null
void removeAddendum(String word, String partOfSpeech)
word
- the word to addpartOfSpeech
- the part of speechboolean isSyllableBoundary(List syllablePhones, 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 IOException
IOException
- if an error occurs while loadingboolean isLoaded()
true
if the lexicon is loadedWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses