|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectG2PRuleReadProcessor
A G2PRuleReadProcessor reads in an XML representation of a tree, representing grapheme-2-phoneme translation rules. This class handles exactly one grapheme and the rules associated with it.
| Constructor Summary | |
G2PRuleReadProcessor()
Create an instance of G2PRuleReadProcessor. |
|
| Method Summary | |
java.util.HashMap |
getValueHash()
|
G2PRuleReadProcessor |
readTree(java.io.BufferedReader reader)
Read in tree from XML file. |
java.lang.String |
translate(G2PRuleReadProcessor node,
java.lang.String str,
int position)
Translate a grapheme into a phoneme. |
void |
walk(G2PRuleReadProcessor node)
Print out the decision tree. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public G2PRuleReadProcessor()
| Method Detail |
public java.util.HashMap getValueHash()
public G2PRuleReadProcessor readTree(java.io.BufferedReader reader)
throws java.io.IOException
reader - a bufferedReader that reads the XML file.
java.io.IOExceptionpublic void walk(G2PRuleReadProcessor node)
node - the node containing the tree to print out.
public java.lang.String translate(G2PRuleReadProcessor node,
java.lang.String str,
int position)
node - the node for the respective grapheme.str - the str where the grapheme occurs.position - the position of the grapheme in the string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||