public class NISTAlign
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
NISTAlign.StringRenderer |
Constructor and Description |
---|
NISTAlign(boolean showResults,
boolean showAlignedResults)
Creates a new NISTAlign object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
align(java.lang.String reference,
java.lang.String hypothesis)
Performs the NIST alignment on the reference and hypothesis strings.
|
java.lang.String |
getAlignedHypothesis()
Returns the aligned hypothesis string.
|
java.lang.String |
getAlignedReference()
Returns the aligned reference string.
|
java.lang.String |
getHypothesis()
Returns the hypothesis string.
|
java.lang.String |
getReference()
Returns the reference string.
|
int |
getTotalDeletions()
Gets the total number of deletions
|
int |
getTotalInsertions()
Gets the total number of insertion errors
|
float |
getTotalSentenceAccuracy()
Returns the total sentence accuracy.
|
int |
getTotalSentences()
Gets the total number of sentences
|
int |
getTotalSentencesWithErrors()
Gets the total number of sentences with errors
|
int |
getTotalSubstitutions()
Gets the total number of substitution errors
|
float |
getTotalWordAccuracy()
Returns the total word accuracy.
|
float |
getTotalWordErrorRate()
Returns the total word accuracy.
|
int |
getTotalWordErrors()
Gets the total number of word errors for all calls to align.
|
int |
getTotalWords()
Gets the total number of words
|
static void |
main(java.lang.String[] args) |
void |
printNISTSentenceSummary()
Prints the results for this sentence to System.out.
|
void |
printNISTTotalSummary()
Prints the summary for all calls to align to System.out.
|
void |
printSentenceSummary()
Prints the results for this sentence to System.out.
|
void |
printTotalSummary()
Prints the total summary for all calls.
|
void |
resetTotals()
Reset the total insertions, deletions, and substitutions counts for this class.
|
void |
setShowAlignedResults(boolean showAlignedResults)
Sets whether aligned results are displayed
|
void |
setShowResults(boolean showResults)
Sets whether results are displayed
|
public NISTAlign(boolean showResults, boolean showAlignedResults)
showResults
- show decoding resultshowAlignedResults
- show alignmentpublic void setShowResults(boolean showResults)
showResults
- true if the results should be displayedpublic void setShowAlignedResults(boolean showAlignedResults)
showAlignedResults
- true if the aligned results should be displayedpublic void resetTotals()
public boolean align(java.lang.String reference, java.lang.String hypothesis)
reference
- the reference stringhypothesis
- the hypothesis stringpublic java.lang.String getReference()
public java.lang.String getHypothesis()
public java.lang.String getAlignedReference()
public java.lang.String getAlignedHypothesis()
public int getTotalWordErrors()
public float getTotalWordAccuracy()
public float getTotalWordErrorRate()
public float getTotalSentenceAccuracy()
public int getTotalWords()
public int getTotalSubstitutions()
public int getTotalInsertions()
public int getTotalDeletions()
public int getTotalSentences()
public int getTotalSentencesWithErrors()
public void printSentenceSummary()
printNISTSentenceSummary()
public void printTotalSummary()
printNISTTotalSummary()
public void printNISTSentenceSummary()
public void printNISTTotalSummary()
public static void main(java.lang.String[] args)