edu.cmu.sphinx.decoder.scorer
Class MaxScoreNormalizer

java.lang.Object
  extended by edu.cmu.sphinx.decoder.scorer.MaxScoreNormalizer
All Implemented Interfaces:
ScoreNormalizer, Configurable

public class MaxScoreNormalizer
extends java.lang.Object
implements ScoreNormalizer

Performs a simple normalization of all token-scores by

Author:
Holger Brandl

Constructor Summary
MaxScoreNormalizer()
           
 
Method Summary
 void newProperties(PropertySheet ps)
          This method is called when this configurable component needs to be reconfigured.
 Scoreable normalize(java.util.List<Token> scoreableList, Scoreable bestToken)
          Normalizes the scores of a set of Tokens.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxScoreNormalizer

public MaxScoreNormalizer()
Method Detail

newProperties

public void newProperties(PropertySheet ps)
                   throws PropertyException
Description copied from interface: Configurable
This method is called when this configurable component needs to be reconfigured.

Specified by:
newProperties in interface Configurable
Parameters:
ps - a property sheet holding the new data
Throws:
PropertyException - if there is a problem with the properties.

normalize

public Scoreable normalize(java.util.List<Token> scoreableList,
                           Scoreable bestToken)
Description copied from interface: ScoreNormalizer
Normalizes the scores of a set of Tokens.

Specified by:
normalize in interface ScoreNormalizer
Parameters:
scoreableList - The set of scores to be normalized
bestToken - The best scoring Token of the above mentioned list. Although not strictly necessary it's included because of convenience reasons and to reduce computational overhead.
Returns:
The best token after the all Tokens have been normalized. In most cases normalization won't change the order but to keep the API open for any kind of approach it seemed reasonable to include this.