|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrita.support.RiTokenToWords
public class RiTokenToWords
Converts the tokens (in English words) in an Utterance into a list of words which are placed back into the Utterance. Usually, the tokens that gets expanded are numbers like "23" (to "twenty" "three").
* It translates the following code from flite:
lang/usenglish/us_text.c
| Constructor Summary | |
|---|---|
RiTokenToWords(com.sun.speech.freetts.cart.CART usNumbersCART,
com.sun.speech.freetts.en.us.PronounceableFSM prefixFSM,
com.sun.speech.freetts.en.us.PronounceableFSM suffixFSM)
Constructs a default USTokenWordProcessor. |
|
| Method Summary | |
|---|---|
com.sun.speech.freetts.Item |
getTokenItem()
Returns the currently processing token Item. |
boolean |
isPronounceable(java.lang.String word)
Returns true if the given word is pronounceable. |
static boolean |
kingLike(com.sun.speech.freetts.Item tokenItem)
Returns true if the given token item contains a token that is in a king-like context, e.g., "King" or "Louis". |
void |
processUtterance(com.sun.speech.freetts.Utterance utterance)
Processes the utterance |
static boolean |
sectionLike(com.sun.speech.freetts.Item tokenItem)
Returns true if the given token item contains a token that is in a section-like context, e.g., "chapter" or "act". |
java.lang.String |
toString()
Converts this object to its String representation |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RiTokenToWords(com.sun.speech.freetts.cart.CART usNumbersCART,
com.sun.speech.freetts.en.us.PronounceableFSM prefixFSM,
com.sun.speech.freetts.en.us.PronounceableFSM suffixFSM)
usNumbersCART - the cart to use to classify numbers| Method Detail |
|---|
public com.sun.speech.freetts.Item getTokenItem()
public void processUtterance(com.sun.speech.freetts.Utterance utterance)
throws com.sun.speech.freetts.ProcessException
processUtterance in interface com.sun.speech.freetts.UtteranceProcessorutterance - the utterance contain the tokens
com.sun.speech.freetts.ProcessException - if an IOException is thrown during the processing of the
utterancepublic static boolean kingLike(com.sun.speech.freetts.Item tokenItem)
tokenItem - the token item to check
public static boolean sectionLike(com.sun.speech.freetts.Item tokenItem)
tokenItem - the token item to check
public boolean isPronounceable(java.lang.String word)
word - the word to test
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||