public class TrainedLTS extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PREDICTED_STRING_FEATURENAME |
protected boolean |
removeTrailingOneFromPhones |
Constructor and Description |
---|
TrainedLTS(AllophoneSet aPhonSet,
CART predictionTree) |
TrainedLTS(AllophoneSet aPhonSet,
InputStream treeStream)
Initializes letter to sound system with a phoneSet, and load the decision tree from the given file.
|
TrainedLTS(AllophoneSet aPhonSet,
InputStream treeStream,
boolean removeTrailingOneFromPhones)
Initializes letter to sound system with a phoneSet, and load the decision tree from the given file.
|
Modifier and Type | Method and Description |
---|---|
void |
loadTree(InputStream treeStream)
Convenience method to load tree from an inputstream
|
static void |
main(String[] args) |
String |
predictPronunciation(String graphemes) |
String |
syllabify(String phones)
Phone chain is syllabified.
|
public static final String PREDICTED_STRING_FEATURENAME
protected boolean removeTrailingOneFromPhones
public TrainedLTS(AllophoneSet aPhonSet, InputStream treeStream, boolean removeTrailingOneFromPhones) throws IOException, MaryConfigurationException
aPhonSet
- phoneset used in syllabificationtreeStream
- treeStreamremoveTrailingOneFromPhones
- removeTrailingOneFromPhonesIOException
- IOExceptionMaryConfigurationException
- MaryConfigurationExceptionpublic TrainedLTS(AllophoneSet aPhonSet, InputStream treeStream) throws IOException, MaryConfigurationException
aPhonSet
- phoneset used in syllabificationtreeStream
- treeStreamIOException
- IOExceptionMaryConfigurationException
- MaryConfigurationExceptionpublic TrainedLTS(AllophoneSet aPhonSet, CART predictionTree)
public void loadTree(InputStream treeStream) throws IOException, MaryConfigurationException
treeStream
- treeStreamIOException
- IOExceptionMaryConfigurationException
- MaryConfigurationExceptionpublic String syllabify(String phones) throws IllegalArgumentException
phones
- input phone chain, unsyllabified, stress marking attached to vowalsIllegalArgumentException
- if the input cannot be syllabifiedpublic static void main(String[] args) throws IOException, MaryConfigurationException
Copyright © 2000–2016 DFKI GmbH. All rights reserved.