public class LTSTrainer extends AlignerTrainer
Modifier and Type | Field and Description |
---|---|
protected boolean |
considerStress |
protected int |
context |
protected boolean |
convertToLowercase |
protected AllophoneSet |
phSet |
graphemeSet, inSplit, logger, optInfo, outSplit
Constructor and Description |
---|
LTSTrainer(AllophoneSet aPhSet,
boolean convertToLowercase,
boolean considerStress,
int context)
Create a new LTSTrainer.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args) |
void |
readLexicon(BufferedReader lexicon,
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(HashMap<String,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(CART tree,
String saveTreefile)
Convenience method to save files to graph2phon.wagon and graph2phon.pfeats in a specified directory with UTF-8 encoding.
|
CART |
trainTree(int minLeafData)
Train the tree, using binary decision nodes.
|
addAlreadySplit, addAlreadySplit, addAlreadySplit, addAlreadySplit, align, alignIteration, getAlignment, getAlignmentString, getInfoAlignment, getInputSyms, lexiconSize, splitAndAdd
protected AllophoneSet phSet
protected int context
protected boolean convertToLowercase
protected boolean considerStress
public LTSTrainer(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 CART trainTree(int minLeafData) throws IOException
minLeafData
- the minimum number of instances that have to occur in at least two subsets induced by splitIOException
- IOExceptionpublic void save(CART tree, String saveTreefile) throws IOException
tree
- treesaveTreefile
- saveTreefileIOException
- IOExceptionpublic void readLexicon(BufferedReader lexicon, String splitPattern) throws IOException
readLexicon
in class AlignerTrainer
lexicon
- reader with lines of lexiconsplitPattern
- a regular expression used for identifying the field separator in each line.IOException
- IOExceptionpublic void readLexicon(HashMap<String,String> lexicon)
lexicon
- lexiconpublic static void main(String[] args) throws IOException, MaryConfigurationException
Copyright © 2000–2016 DFKI GmbH. All rights reserved.