public class LTSTrainer
extends marytts.fst.AlignerTrainer
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
considerStress |
protected int |
context |
protected boolean |
convertToLowercase |
protected marytts.modules.phonemiser.AllophoneSet |
phSet |
| Constructor and Description |
|---|
LTSTrainer(marytts.modules.phonemiser.AllophoneSet aPhSet,
boolean convertToLowercase,
boolean considerStress,
int context)
Create a new LTSTrainer.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args) |
void |
readLexicon(java.io.BufferedReader lexicon,
java.lang.String splitPattern)
reads in a lexicon in text format, lines are of the kind:
graphemechain | phonechain | otherinformation
Stress is optionally preserved, marking the first vowel of a stressed syllable with "1".
|
void |
readLexicon(java.util.HashMap<java.lang.String,java.lang.String> lexicon)
reads in a lexicon in text format, lines are of the kind:
graphemechain | phonechain | otherinformation
Stress is optionally preserved, marking the first vowel of a stressed syllable with "1".
|
void |
save(marytts.cart.CART tree,
java.lang.String saveTreefile)
Convenience method to save files to graph2phon.wagon and graph2phon.pfeats in a specified directory with UTF-8 encoding.
|
marytts.cart.CART |
trainTree(int minLeafData)
Train the tree, using binary decision nodes.
|
protected marytts.modules.phonemiser.AllophoneSet phSet
protected int context
protected boolean convertToLowercase
protected boolean considerStress
public LTSTrainer(marytts.modules.phonemiser.AllophoneSet aPhSet,
boolean convertToLowercase,
boolean considerStress,
int context)
aPhSet - the allophone set to use.convertToLowercase - whether to convert all graphemes to lowercase, using the locale of the allophone set.considerStress - indicator if stress is preservedcontext - contextpublic marytts.cart.CART trainTree(int minLeafData)
throws java.io.IOException
minLeafData - the minimum number of instances that have to occur in at least two subsets induced by splitjava.io.IOException - IOExceptionpublic void save(marytts.cart.CART tree,
java.lang.String saveTreefile)
throws java.io.IOException
tree - treesaveTreefile - saveTreefilejava.io.IOException - IOExceptionpublic void readLexicon(java.io.BufferedReader lexicon,
java.lang.String splitPattern)
throws java.io.IOException
readLexicon in class marytts.fst.AlignerTrainerlexicon - reader with lines of lexiconsplitPattern - a regular expression used for identifying the field separator in each line.java.io.IOException - IOExceptionpublic void readLexicon(java.util.HashMap<java.lang.String,java.lang.String> lexicon)
lexicon - lexiconpublic static void main(java.lang.String[] args)
throws java.io.IOException,
marytts.exceptions.MaryConfigurationException
java.io.IOExceptionmarytts.exceptions.MaryConfigurationException