edu.cmu.sphinx.decoder.scorer
Class BackgroundModelNormalizer

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

public class BackgroundModelNormalizer
extends java.lang.Object
implements ScoreNormalizer

Normalizes a set of Tokens against the best scoring Token of a background model.

Author:
Holger Brandl

Field Summary
static java.lang.String ACTIVE_LIST_PROVIDER
          The active list provider used to determined the best token for normalization.
 
Constructor Summary
BackgroundModelNormalizer()
           
BackgroundModelNormalizer(SimpleBreadthFirstSearchManager activeListProvider)
           
 
Method Summary
 void newProperties(PropertySheet ps)
          This method is called when this configurable component needs to be reconfigured.
 Scoreable normalize(java.util.List<? extends Scoreable> 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
 

Field Detail

ACTIVE_LIST_PROVIDER

@S4Component(type=SimpleBreadthFirstSearchManager.class,
             mandatory=false)
public static final java.lang.String ACTIVE_LIST_PROVIDER
The active list provider used to determined the best token for normalization. If this reference is not defined no nomralization will be applied.

See Also:
Constant Field Values
Constructor Detail

BackgroundModelNormalizer

public BackgroundModelNormalizer()

BackgroundModelNormalizer

public BackgroundModelNormalizer(SimpleBreadthFirstSearchManager activeListProvider)
Parameters:
activeListProvider - The active list provider used to determined the best token for normalization. If this reference is not defined no nomralization will be applied.
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<? extends Scoreable> 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.