edu.cmu.sphinx.decoder.scorer
Class AbstractScorer

java.lang.Object
  extended by edu.cmu.sphinx.decoder.scorer.AbstractScorer
All Implemented Interfaces:
AcousticScorer, Configurable
Direct Known Subclasses:
SimpleAcousticScorer, ThreadedAcousticScorer

public abstract class AbstractScorer
extends java.lang.Object
implements AcousticScorer

Implements some basic scorer functionality but keeps specific scoring open for sub-classes.

Author:
Holger Brandl

Field Summary
static java.lang.String FEATURE_FRONTEND
          Property the defines the frontend to retrieve features from for scoring
static java.lang.String SCORE_NORMALIZER
          An opotional post-processor for computed scores that will normalize scores.
 
Constructor Summary
AbstractScorer()
           
 
Method Summary
 void allocate()
          Allocates resources for this scorer
 Scoreable calculateScores(java.util.List<Token> scoreableList)
          Scores the given set of states.
 void deallocate()
          Deallocates resouces for this scorer
 void newProperties(PropertySheet ps)
          This method is called when this configurable component needs to be reconfigured.
 void startRecognition()
          starts the scorer
 void stopRecognition()
          stops the scorer
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FEATURE_FRONTEND

@S4Component(type=BaseDataProcessor.class)
public static final java.lang.String FEATURE_FRONTEND
Property the defines the frontend to retrieve features from for scoring

See Also:
Constant Field Values

SCORE_NORMALIZER

@S4Component(type=ScoreNormalizer.class,
             mandatory=false)
public static final java.lang.String SCORE_NORMALIZER
An opotional post-processor for computed scores that will normalize scores. If not set, no normalization will applied and the token scores will be returned unchanged.

See Also:
Constant Field Values
Constructor Detail

AbstractScorer

public AbstractScorer()
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.

calculateScores

public Scoreable calculateScores(java.util.List<Token> scoreableList)
Scores the given set of states.

Specified by:
calculateScores in interface AcousticScorer
Parameters:
scoreableList - A list containing scoreable objects to be scored
Returns:
The best scoring scoreable, or null if there are no more features to score

startRecognition

public void startRecognition()
Description copied from interface: AcousticScorer
starts the scorer

Specified by:
startRecognition in interface AcousticScorer

stopRecognition

public void stopRecognition()
Description copied from interface: AcousticScorer
stops the scorer

Specified by:
stopRecognition in interface AcousticScorer

allocate

public void allocate()
Description copied from interface: AcousticScorer
Allocates resources for this scorer

Specified by:
allocate in interface AcousticScorer

deallocate

public void deallocate()
Description copied from interface: AcousticScorer
Deallocates resouces for this scorer

Specified by:
deallocate in interface AcousticScorer

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object