edu.cmu.sphinx.result
Class WordResultPath

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended byedu.cmu.sphinx.result.WordResultPath
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, Path, java.util.RandomAccess, java.io.Serializable

public class WordResultPath
extends java.util.Vector
implements Path

An implementation of a result Path that computes scores and confidences on the fly.

Author:
pgorniak
See Also:
Serialized Form

Method Summary
 double getConfidence()
          Returns a log confidence score for this path.
 LogMath getLogMath()
          Returns the LogMath of the scores.
 double getScore()
          Gets the total score for this path.
 java.lang.String getTranscription()
          Gets the transcription of the path.
 WordResult[] getWords()
          Gets the ordered set of words for this path
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cmu.sphinx.result.Path
toString
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Method Detail

getScore

public double getScore()
Description copied from interface: Path
Gets the total score for this path. Scores are in the LogMath log domain

Specified by:
getScore in interface Path
Returns:
the score for the path in the LogMath log domaain.
See Also:
Path.getScore()

getConfidence

public double getConfidence()
Description copied from interface: Path
Returns a log confidence score for this path. Use the getLogMath().logToLinear() method to convert the log confidence score to linear. The linear value should be between 0.0 and 1.0 (inclusive).

Specified by:
getConfidence in interface Path
Returns:
a log confidence score which linear value is between 0.0 and 1.0 (inclusive)
See Also:
Path.getConfidence()

getLogMath

public LogMath getLogMath()
Returns the LogMath of the scores.

Specified by:
getLogMath in interface Path
Returns:
the LogMath of the scores

getWords

public WordResult[] getWords()
Description copied from interface: Path
Gets the ordered set of words for this path

Specified by:
getWords in interface Path
Returns:
an array containing zero or more words
See Also:
Path.getWords()

getTranscription

public java.lang.String getTranscription()
Description copied from interface: Path
Gets the transcription of the path.

Specified by:
getTranscription in interface Path
Returns:
the transcription of the path.
See Also:
Path.getTranscription()