public class USEnglishTokenizer extends java.lang.Object implements TextTokenizer
* It translates the following code from flite:
lang/usenglish/us_text.c
Constructor and Description |
---|
USEnglishTokenizer()
Constructs a default USTokenWordProcessor.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
expand(java.lang.String text)
Process the utterance
|
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(Item tokenItem)
Returns true if the given token item contains a token that is in a
king-like context, e.g., "King" or "Louis".
|
static boolean |
sectionLike(Item tokenItem)
Returns true if the given token item contains a token that is in a
section-like context, e.g., "chapter" or "act".
|
public USEnglishTokenizer()
public Item getTokenItem()
public java.util.List<java.lang.String> expand(java.lang.String text)
expand
in interface TextTokenizer
text
- the utterance containing the tokenspublic static boolean kingLike(Item tokenItem)
tokenItem
- the token item to checkpublic static boolean sectionLike(Item tokenItem)
tokenItem
- the token item to checkpublic boolean isPronounceable(java.lang.String word)
word
- the word to test