Package com.keenresearch.keenasr
Class KASRAlternativePronunciation
java.lang.Object
com.keenresearch.keenasr.KASRAlternativePronunciation
KASRAlternativePronunciation provides way to specify alternative pronunciations for words that
may not be in the lexicon from the ASR Bundle. You will typically use this class to define
pronunciations in following scenarios: 1) word is not in the lexicon and you want to provide
predefined pronunciation and not rely on automatic grapheme-to-phoneme module to define one;
2) word might be in lexicon but you would like to provide additional pronunciations (e.g. in
some command and control scenarios you could define common mispronunciations of the word;
3) similar to 1) you could also use it to define pronunciation for made-up-words (for example in
educational applications focused on reading).
-
Constructor Summary
ConstructorDescriptionKASRAlternativePronunciation
(String word, String pronunciation) Creates an instance of KASRAltenativePronuncation object for a given word.KASRAlternativePronunciation
(String word, String pronunciation, String tag) Creates an instance of KASRAltenativePronuncation object for a given word. -
Method Summary
-
Constructor Details
-
KASRAlternativePronunciation
Creates an instance of KASRAltenativePronuncation object for a given word.- Parameters:
word
- text of the wordpronunciation
- a string with space separated sequence of phonemes that represent pronunciation for this wordtag
- optional tag; if specified it will be appended to the word with a # symbol. For example, if the word is "APPLE" and the tag is "WRONG", then if variation with specified pronunciation is recognized, word will be APPLE#WRONG.
-
KASRAlternativePronunciation
Creates an instance of KASRAltenativePronuncation object for a given word.- Parameters:
word
- text of the wordpronunciation
- a string with space separated sequence of phonemes that represent pronunciation for this word
-
-
Method Details
-
getWord
- Returns:
- String instance that contains word name for this alternative pronunciation.
-
getPronunciation
- Returns:
- String instance that contains space separated sequence of phonemes that define pronunciation of this word.
-
getTag
- Returns:
- Tag that was associated with this alternative pronunciation;
-