public class PhoneTranslator extends Object
Constructor and Description |
---|
PhoneTranslator(InputStream trickyPhonesStream) |
Modifier and Type | Method and Description |
---|---|
String |
features2context(FeatureDefinition def,
FeatureVector featureVector,
Vector<String> featureList)
Convert the feature vector into a context model name to be used by HTS/HTK.
|
String |
features2LongContext(FeatureDefinition def,
FeatureVector featureVector,
Vector<String> featureList)
Convert the feature vector into a context model name to be used by HTS/HTK.
|
static void |
main(String[] args) |
String |
replaceBackPunc(String lab) |
String |
replaceBackToBI(String lab) |
String |
replaceBackTrickyPhones(String lab)
Translation table for labels which are incompatible with HTK or shell filenames See common_routines.pl in HTS training.
|
String |
replacePunc(String lab) |
String |
replaceToBI(String lab) |
String |
replaceTrickyPhones(String lab)
Translation table for labels which are incompatible with HTK or shell filenames See common_routines.pl in HTS training.
|
void |
setContextFeatureFile(String str) |
String |
shortenPfeat(String fea)
Shorten the key name (to make the full context names shorter) See common_routines.pl in HTS training.
|
public PhoneTranslator(InputStream trickyPhonesStream) throws IOException
IOException
public void setContextFeatureFile(String str)
public String features2context(FeatureDefinition def, FeatureVector featureVector, Vector<String> featureList)
def
- a feature definitionfeatureVector
- a feature vector which must be consistent with the Feature definitionfeatureList
- a list of features to use in constructing the context model name. If missing, all features in the feature
definition are used.public String features2LongContext(FeatureDefinition def, FeatureVector featureVector, Vector<String> featureList)
def
- a feature definitionfeatureVector
- a feature vector which must be consistent with the Feature definitionfeatureList
- a list of features to use in constructing the context model name. If missing, all features in the feature
definition are used.public String replaceTrickyPhones(String lab)
lab
- labpublic String replaceBackTrickyPhones(String lab)
lab
- labpublic String shortenPfeat(String fea)
fea
- feaCopyright © 2000–2016 DFKI GmbH. All rights reserved.