edu.cmu.sphinx.result
Class WordResultPath

java.lang.Object
  extended by edu.cmu.sphinx.result.WordResultPath
All Implemented Interfaces:
Path

public class WordResultPath
extends java.lang.Object
implements Path

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

Author:
pgorniak

Method Summary
 void add(WordResult wr)
           
 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.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.cmu.sphinx.result.Path
toString
 

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()

add

public void add(WordResult wr)