|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectG2PRuleReader
A G2PRuleReader reads in an XML representation of a tree that contains grapheme-2-phoneme translation rules. This class handles all graphemes in the XML file (unlike G2PRuleReadProcessor).
| Constructor Summary | |
G2PRuleReader()
|
|
| Method Summary | |
java.util.HashMap |
makeNodes(java.io.BufferedReader b)
Read in XML file and create a decision tree for each grapheme. |
java.lang.String |
translateString(java.util.HashMap nodesHash,
java.lang.String str)
Translate a string (!) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public G2PRuleReader()
| Method Detail |
public java.util.HashMap makeNodes(java.io.BufferedReader b)
throws java.io.IOException
b - BufferedReader that reads the XML file.
java.io.IOException
public java.lang.String translateString(java.util.HashMap nodesHash,
java.lang.String str)
nodesHash - a hash map with (grapheme,tree) pairs.str - the grapheme string to be translated.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||