edu.cmu.sphinx.decoder.scorer
Class SimpleAcousticScorer

java.lang.Object
  extended byedu.cmu.sphinx.decoder.scorer.SimpleAcousticScorer
All Implemented Interfaces:
AcousticScorer, Configurable

public class SimpleAcousticScorer
extends java.lang.Object
implements AcousticScorer

A Simple acoustic scorer. a certain number of frames have been processed Note that all scores are maintained in LogMath log base.


Field Summary
static java.lang.String PROP_FRONTEND
          Property the defines the frontend to retrieve features from for scoring
static java.lang.String PROP_NORMALIZE_SCORES
          Propertry that defines whether scores are normalized or not
static boolean PROP_NORMALIZE_SCORES_DEFAULT
          Default value for PROP_NORMALIZE_SCORES
 
Constructor Summary
SimpleAcousticScorer()
           
 
Method Summary
 void allocate()
          Allocates resources for this scorer
 Scoreable calculateScores(java.util.List scoreableList)
          Scores the given set of states
 void deallocate()
          Deallocates resouces for this scorer
 java.lang.String getName()
          Retrieves the name for this configurable component
 void newProperties(PropertySheet ps)
          This method is called when this configurable component has new data.
 void register(java.lang.String name, Registry registry)
          Register my properties.
 void startRecognition()
          Starts the scorer
 void stopRecognition()
          Performs post-recognition cleanup.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_FRONTEND

public static final java.lang.String PROP_FRONTEND
Property the defines the frontend to retrieve features from for scoring

See Also:
Constant Field Values

PROP_NORMALIZE_SCORES

public static final java.lang.String PROP_NORMALIZE_SCORES
Propertry that defines whether scores are normalized or not

See Also:
Constant Field Values

PROP_NORMALIZE_SCORES_DEFAULT

public static final boolean PROP_NORMALIZE_SCORES_DEFAULT
Default value for PROP_NORMALIZE_SCORES

See Also:
Constant Field Values
Constructor Detail

SimpleAcousticScorer

public SimpleAcousticScorer()
Method Detail

register

public void register(java.lang.String name,
                     Registry registry)
              throws PropertyException
Description copied from interface: Configurable
Register my properties. This method is called once early in the time of the component, shortly after the component is constructed. This component should register any configuration properties that it needs to register. If this configurable extends another configurable, super.register should also be called

Specified by:
register in interface Configurable
Parameters:
name - the name of the component
registry - the registry for this component
Throws:
PropertyException

newProperties

public void newProperties(PropertySheet ps)
                   throws PropertyException
Description copied from interface: Configurable
This method is called when this configurable component has new data. The component should first validate the data. If it is bad the component should return false. If the data is good, the component should record the the data internally and return true.

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.

getName

public java.lang.String getName()
Description copied from interface: Configurable
Retrieves the name for this configurable component

Specified by:
getName in interface Configurable
Returns:
the name

startRecognition

public void startRecognition()
Starts the scorer

Specified by:
startRecognition in interface AcousticScorer

calculateScores

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

Specified by:
calculateScores in interface AcousticScorer
Parameters:
scoreableList - a list containing scoreable objects to be scored
Returns:
true if there was a Data available to score false if there was no more Data available to score

stopRecognition

public void stopRecognition()
Performs post-recognition cleanup.

Specified by:
stopRecognition in interface AcousticScorer

allocate

public void allocate()
              throws java.io.IOException
Description copied from interface: AcousticScorer
Allocates resources for this scorer

Specified by:
allocate in interface AcousticScorer
Throws:
java.io.IOException

deallocate

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

Specified by:
deallocate in interface AcousticScorer