public class TranscriptionAligner extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,Integer> |
aligncost |
protected AllophoneSet |
allophoneSet |
protected int |
defaultBoundaryCost |
protected int |
defaultcost |
protected boolean |
ensureInitialBoundary |
protected String |
entrySeparator |
protected String |
possibleBnd |
protected int |
skipcost |
Constructor and Description |
---|
TranscriptionAligner() |
TranscriptionAligner(AllophoneSet allophoneSet) |
TranscriptionAligner(AllophoneSet allophoneSet,
String entrySeparator) |
Modifier and Type | Method and Description |
---|---|
AlignedLabels |
alignLabels(Labels first,
Labels second)
Align the two given sequences of labels and return a mapping array indicating which index in first should be aligned to
which index in second.
|
protected String |
distanceAlign(String in,
String out)
This computes the alignment that has the lowest distance between two Strings.
|
boolean |
getEnsureInitialBoundary() |
String |
getEntrySeparator() |
static String |
readLabelFile(String entrySeparator,
boolean ensureInitialBoundary,
String trfname)
This reads in a label file and returns a String of the phonetic symbols, separated by the entry separator character
entrySeparator.
|
void |
SetEnsureInitialBoundary(boolean value) |
protected int defaultcost
protected int defaultBoundaryCost
protected int skipcost
protected AllophoneSet allophoneSet
protected String possibleBnd
protected String entrySeparator
protected boolean ensureInitialBoundary
public TranscriptionAligner()
public TranscriptionAligner(AllophoneSet allophoneSet)
public TranscriptionAligner(AllophoneSet allophoneSet, String entrySeparator)
public void SetEnsureInitialBoundary(boolean value)
public boolean getEnsureInitialBoundary()
public String getEntrySeparator()
public static String readLabelFile(String entrySeparator, boolean ensureInitialBoundary, String trfname) throws IOException
entrySeparator
- entry separatorensureInitialBoundary
- ensure initial boundarytrfname
- trf nameIOException
- if something goes wrong with opening/reading the fileprotected String distanceAlign(String in, String out)
in
- inout
- outpublic AlignedLabels alignLabels(Labels first, Labels second)
first
- firstsecond
- secondCopyright © 2000–2016 DFKI GmbH. All rights reserved.