edu.cmu.sphinx.decoder.scorer
Interface Scoreable

All Known Implementing Classes:
Token

public interface Scoreable

Represents an entity that can be scored against a data


Method Summary
 float calculateScore(Data data, boolean keepData, float gain)
          Calculates a score against the given data.
 int getFrameNumber()
          Returns the frame number that this Scoreable should be scored against.
 float getScore()
          Retrieves a previously calculated (and possibly normalized) score
 float normalizeScore(float maxScore)
          Normalizes a previously calculated score
 

Method Detail

calculateScore

public float calculateScore(Data data,
                            boolean keepData,
                            float gain)
Calculates a score against the given data. The score can be retreived with get score

Parameters:
data - the data to be scored
keepData - whether this Scoreable should keep a reference to the given data
gain - the gain to apply to the acoustic score
Returns:
the score for the data

getScore

public float getScore()
Retrieves a previously calculated (and possibly normalized) score

Returns:
the score

normalizeScore

public float normalizeScore(float maxScore)
Normalizes a previously calculated score

Returns:
the normalized score

getFrameNumber

public int getFrameNumber()
Returns the frame number that this Scoreable should be scored against.

Returns:
the frame number that this Scoreable should be scored against.