com.sun.speech.freetts.en.us
public class NumberExpander extends java.lang.Object
lang/usEnglish/us_expand.c
Modifier and Type | Method and Description |
---|---|
static void |
expandDigits(java.lang.String numberString,
WordRelation wordRelation)
Expands given token to list of words pronouncing it as digits
|
static void |
expandID(java.lang.String numberString,
WordRelation wordRelation)
Expands the given number string as pairs as in years or IDs
|
static void |
expandLetters(java.lang.String letters,
WordRelation wordRelation)
Expands the given string of letters as a list of single char symbols.
|
static void |
expandNumber(java.lang.String numberString,
WordRelation wordRelation)
Expands a digit string into a list of English words of those digits.
|
static void |
expandOrdinal(java.lang.String rawNumberString,
WordRelation wordRelation)
Expands the digit string of an ordinal number.
|
static void |
expandReal(java.lang.String numberString,
WordRelation wordRelation)
Expands the given number string as a real number.
|
static int |
expandRoman(java.lang.String roman)
Returns the integer value of the given string of Roman numerals.
|
static boolean |
isDigit(char ch)
Returns true if the given character is a digit (0-9 only).
|
public static void expandNumber(java.lang.String numberString, WordRelation wordRelation)
numberString
- the digit string to expand.wordRelation
- words are added to this Relationpublic static void expandDigits(java.lang.String numberString, WordRelation wordRelation)
numberString
- the string which is the number to expandwordRelation
- words are added to this Relationpublic static void expandOrdinal(java.lang.String rawNumberString, WordRelation wordRelation)
rawNumberString
- the string which is the number to expandwordRelation
- words are added to this Relationpublic static void expandID(java.lang.String numberString, WordRelation wordRelation)
numberString
- the string which is the number to expandwordRelation
- words are added to this Relationpublic static void expandReal(java.lang.String numberString, WordRelation wordRelation)
numberString
- the string which is the real number to expandwordRelation
- words are added to this Relationpublic static void expandLetters(java.lang.String letters, WordRelation wordRelation)
letters
- the string of letters to expandwordRelation
- words are added to this Relationpublic static int expandRoman(java.lang.String roman)
roman
- the string of Roman numberspublic static boolean isDigit(char ch)
ch
- the character to test