edu.cmu.sphinx.linguist.language.classes
Class ClassMap

java.lang.Object
  extended by edu.cmu.sphinx.linguist.language.classes.ClassMap
All Implemented Interfaces:
Configurable

public class ClassMap
extends java.lang.Object
implements Configurable

A component that knows how to map words to classes and vice versa.

Author:
Tanel Alumae

Field Summary
static java.lang.String PROP_CLASS_DEFS_LOCATION
           
static java.lang.String PROP_LOG_MATH
          Sphinx property that defines the logMath component.
 
Constructor Summary
ClassMap()
           
ClassMap(java.net.URL classDefsLocation, LogMath logMath)
           
 
Method Summary
 void allocate()
           
 void deallocate()
           
 Word getClassAsWord(java.lang.String text)
           
 edu.cmu.sphinx.linguist.language.classes.ClassProbability getClassProbability(java.lang.String word)
           
 java.util.Set<java.lang.String> getWordsInClass(java.lang.String className)
           
 void newProperties(PropertySheet ps)
          This method is called when this configurable component needs to be reconfigured.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_LOG_MATH

@S4Component(type=LogMath.class)
public static final java.lang.String PROP_LOG_MATH
Sphinx property that defines the logMath component.

See Also:
Constant Field Values

PROP_CLASS_DEFS_LOCATION

@S4String
public static final java.lang.String PROP_CLASS_DEFS_LOCATION
See Also:
Constant Field Values
Constructor Detail

ClassMap

public ClassMap(java.net.URL classDefsLocation,
                LogMath logMath)

ClassMap

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

allocate

public void allocate()
              throws java.io.IOException
Throws:
java.io.IOException

deallocate

public void deallocate()

getClassProbability

public edu.cmu.sphinx.linguist.language.classes.ClassProbability getClassProbability(java.lang.String word)

getClassAsWord

public Word getClassAsWord(java.lang.String text)

getWordsInClass

public java.util.Set<java.lang.String> getWordsInClass(java.lang.String className)