edu.cmu.sphinx.result
Interface WordResult

All Known Implementing Classes:
SimpleWordResult

public interface WordResult

Represents a word in a recognition result. This is designed specifically for obtaining confidence scores. All scores are maintained in LogMath log base.


Method Summary
 double getConfidence()
          Returns a log confidence score for this WordResult.
 Data[] getDataFrames()
          Gets the feature frames associated with this word
 int getEndFrame()
          Gets the ending frame number for the word
 LogMath getLogMath()
          Returns the log math of the scores.
 Pronunciation getPronunciation()
          Gets the pronunciation for this word.
 double getScore()
          Gets the total score for this word.
 int getStartFrame()
          Gets the starting frame number for the word
 java.lang.String toString()
          Returns a string representation of this object
 

Method Detail

getScore

public double getScore()
Gets the total score for this word.

Returns:
the score for the word (in LogMath log base)

getConfidence

public double getConfidence()
Returns a log confidence score for this WordResult. 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) for this word.

Returns:
a log confidence score which linear value is between 0.0 and 1.0 (inclusive)

getLogMath

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

Returns:
the log math of the scores

getPronunciation

public Pronunciation getPronunciation()
Gets the pronunciation for this word.

Returns:
the pronunciation for the word

getStartFrame

public int getStartFrame()
Gets the starting frame number for the word

Returns:
the starting frame number for the word

getEndFrame

public int getEndFrame()
Gets the ending frame number for the word

Returns:
the ending frame number for the word

getDataFrames

public Data[] getDataFrames()
Gets the feature frames associated with this word

Returns:
the set of feature frames associated with this word, or null if the frames are not available.

toString

public java.lang.String toString()
Returns a string representation of this object