public class PhoneLabelFeatureAligner extends VoiceImportComponent
Modifier and Type | Class and Description |
---|---|
static class |
PhoneLabelFeatureAligner.EditFrameShower |
Modifier and Type | Field and Description |
---|---|
protected AllophonesExtractor |
allophoneExtractor |
protected boolean |
correctedPauses |
protected DatabaseLayout |
db |
protected String |
featsDir |
protected String |
featsExt |
protected PhoneUnitFeatureComputer |
featureComputer |
protected String |
labDir |
protected PhoneUnitLabelComputer |
labelComputer |
protected String |
labExt |
protected String |
pauseSymbol |
protected int |
percent |
protected Map<String,String> |
problems |
protected static int |
REMOVE |
protected static int |
REMOVEALL |
protected static int |
SKIP |
protected static int |
SKIPALL |
protected TranscriptionAligner |
transcriptionAligner |
protected static int |
TRYAGAIN |
bnl, logger, props, props2Help
Constructor and Description |
---|
PhoneLabelFeatureAligner() |
Modifier and Type | Method and Description |
---|---|
boolean |
compute()
Align labels and features.
|
protected int |
correctPauses()
Try to automatically correct misalignment caused by pauses: If there is a pause in the label file and not in the feature
file, it is removed in the label file.
|
protected int |
correctPausesYesNo(int numProblems)
Let the user select if he wants to run the the automatic correction of pauses.
|
protected void |
customInitialisation() |
protected void |
defineReplacementInfo(String text) |
protected void |
defineReplacements(String text) |
protected void |
defineReplacementWindow() |
protected void |
deleteProblemsYesNo(Map<String,String> someProblems,
String basename)
Let the user select if he wants to run the the automatic correction of pauses.
|
SortedMap<String,String> |
getDefaultProps(DatabaseLayout theDb)
Get the map of properties2values containing the default values
|
String |
getName()
Get the name of this component
|
int |
getProgress()
Provide the progress of computation, in percent, or -1 if that feature is not implemented.
|
protected void |
initialiseComp()
Initialise a voice import component: component specific initialisation; to be overwritten by subclasses
|
protected int |
letUserCorrect(String basename,
String errorMessage) |
static void |
main(String[] args) |
protected void |
setupHelp() |
protected String |
verifyAlignment(String basename)
Verify if the feature and label files for basename align OK.
|
getHelpText, getHelpTextForProp, getProp, initialise, setProp
protected PhoneUnitFeatureComputer featureComputer
protected AllophonesExtractor allophoneExtractor
protected PhoneUnitLabelComputer labelComputer
protected TranscriptionAligner transcriptionAligner
protected String pauseSymbol
protected DatabaseLayout db
protected int percent
protected boolean correctedPauses
protected String featsExt
protected String labExt
protected String labDir
protected String featsDir
protected static final int TRYAGAIN
protected static final int SKIP
protected static final int SKIPALL
protected static final int REMOVE
protected static final int REMOVEALL
public String getName()
VoiceImportComponent
getName
in class VoiceImportComponent
protected void customInitialisation()
protected final void initialiseComp() throws Exception
VoiceImportComponent
initialiseComp
in class VoiceImportComponent
Exception
- Exceptionpublic SortedMap<String,String> getDefaultProps(DatabaseLayout theDb)
VoiceImportComponent
getDefaultProps
in class VoiceImportComponent
theDb
- dbprotected void setupHelp()
setupHelp
in class VoiceImportComponent
public boolean compute() throws Exception
compute
in class VoiceImportComponent
Exception
- Exceptionprotected int correctPausesYesNo(int numProblems) throws IOException
numProblems
- the number of problemsIOException
- IOExceptionprotected void deleteProblemsYesNo(Map<String,String> someProblems, String basename) throws IOException
someProblems
- someProblemsbasename
- basenameIOException
- IOExceptionprotected void defineReplacementWindow()
protected void defineReplacementInfo(String text)
protected int correctPauses() throws IOException
IOException
- IOExceptionprotected void defineReplacements(String text) throws Exception
Exception
protected String verifyAlignment(String basename) throws IOException
basename
- basenameIOException
- IOExceptionprotected int letUserCorrect(String basename, String errorMessage) throws Exception
Exception
public int getProgress()
getProgress
in class VoiceImportComponent
Copyright © 2000–2016 DFKI GmbH. All rights reserved.