|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issco.eval.WordErrorRate
public class WordErrorRate
Class useful for computing Word Error Rate. The "computeNumerator" method computes the total number of word deletions, insertions and substitutions required in order to obtain the "reference" (ref) data starting from "hypothetised" (hyp) data.
Field Summary | |
---|---|
(package private) java.lang.String[] |
hyp
|
(package private) java.lang.String[] |
ref
|
(package private) java.lang.String |
wordDeliminator
|
Constructor Summary | |
---|---|
WordErrorRate()
Deprecated. Use WordErrorRate(String refStr, String hypStr, String wordDeliminator) instead |
|
WordErrorRate(java.lang.String refStr,
java.lang.String hypStr,
java.lang.String wordDeliminator)
|
Method Summary | |
---|---|
float |
computeDenominator()
Computes word error rate denominator, i.e. |
float |
computeNumerator()
Computes the numerator for word error rate. |
java.lang.String[] |
getHyp()
|
java.lang.String[] |
getRef()
|
static void |
main(java.lang.String[] args)
WordErrorRate's main can be called with two arguments of type String and containing: 1) the reference utterancel; 2) the hypothetised utterance. |
void |
setHyp(java.lang.String hypStr)
Sets the value of the ' Hyp ' attribute. |
void |
setRef(java.lang.String refStr)
Sets the value of the ' Ref ' attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.lang.String wordDeliminator
java.lang.String[] ref
java.lang.String[] hyp
Constructor Detail |
---|
public WordErrorRate()
public WordErrorRate(java.lang.String refStr, java.lang.String hypStr, java.lang.String wordDeliminator)
refStr
- - reference utterance, where each two words are separated by a string specified by wordDeliminatorhypStr
- - hypothetised utterance, where each two words are separated by a a string specified by wordDeliminator.wordDeliminator
- - A string or a character (e.g. a space, a comma, etc.) used to delimit text into words.Method Detail |
---|
public float computeDenominator()
computeDenominator
in interface ErrorRate
public float computeNumerator()
computeNumerator
in interface ErrorRate
public java.lang.String[] getHyp()
getHyp
in interface ErrorRate
public java.lang.String[] getRef()
getRef
in interface ErrorRate
public void setHyp(java.lang.String hypStr)
ErrorRate
Hyp
' attribute.
setHyp
in interface ErrorRate
hypStr
- the new value of the 'Hyp' attribute.ErrorRate.getHyp()
public void setRef(java.lang.String refStr)
ErrorRate
Ref
' attribute.
setRef
in interface ErrorRate
refStr
- the new value of the 'Ref' attribute.ErrorRate.getRef()
public static void main(java.lang.String[] args)
args
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |