edu.cmu.sphinx.linguist.dictionary
Class MappingDictionary

java.lang.Object
  extended by edu.cmu.sphinx.linguist.dictionary.FastDictionary
      extended by edu.cmu.sphinx.linguist.dictionary.MappingDictionary
All Implemented Interfaces:
Dictionary, Configurable

public class MappingDictionary
extends FastDictionary
implements Dictionary

Maps the phones from one phoneset to another to use dictionary from the one acoustic mode with another one. The mapping file is specified with a mapList property. The contents should look like

 AX AH
 IX IH
 


Field Summary
static java.lang.String PROP_MAP_FILE
           
 
Fields inherited from class edu.cmu.sphinx.linguist.dictionary.FastDictionary
PROP_ADDENDA
 
Fields inherited from interface edu.cmu.sphinx.linguist.dictionary.Dictionary
PROP_ADD_SIL_ENDING_PRONUNCIATION, PROP_ALLOW_MISSING_WORDS, PROP_CREATE_MISSING_WORDS, PROP_DICTIONARY, PROP_FILLER_DICTIONARY, PROP_UNIT_MANAGER, PROP_WORD_REPLACEMENT, SENTENCE_END_SPELLING, SENTENCE_START_SPELLING, SILENCE_SPELLING
 
Constructor Summary
MappingDictionary()
           
MappingDictionary(java.net.URL mappingFile, java.net.URL wordDictionaryFile, java.net.URL fillerDictionaryFile, java.util.List<java.net.URL> addendaUrlList, boolean addSilEndingPronunciation, java.lang.String wordReplacement, boolean allowMissingWords, boolean createMissingWords, UnitManager unitManager)
           
 
Method Summary
 void allocate()
          Allocates the dictionary
 void newProperties(PropertySheet ps)
          This method is called when this configurable component needs to be reconfigured.
 
Methods inherited from class edu.cmu.sphinx.linguist.dictionary.FastDictionary
deallocate, dump, getFillerDictionaryFile, getFillerWords, getPossibleWordClassifications, getSentenceEndWord, getSentenceStartWord, getSilenceWord, getWord, getWordDictionaryFile, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cmu.sphinx.linguist.dictionary.Dictionary
deallocate, getFillerWords, getPossibleWordClassifications, getSentenceEndWord, getSentenceStartWord, getSilenceWord, getWord
 

Field Detail

PROP_MAP_FILE

@S4String(mandatory=true,
          defaultValue="")
public static final java.lang.String PROP_MAP_FILE
See Also:
Constant Field Values
Constructor Detail

MappingDictionary

public MappingDictionary(java.net.URL mappingFile,
                         java.net.URL wordDictionaryFile,
                         java.net.URL fillerDictionaryFile,
                         java.util.List<java.net.URL> addendaUrlList,
                         boolean addSilEndingPronunciation,
                         java.lang.String wordReplacement,
                         boolean allowMissingWords,
                         boolean createMissingWords,
                         UnitManager unitManager)

MappingDictionary

public MappingDictionary()
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
Overrides:
newProperties in class FastDictionary
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
Description copied from interface: Dictionary
Allocates the dictionary

Specified by:
allocate in interface Dictionary
Overrides:
allocate in class FastDictionary
Throws:
java.io.IOException - if there is trouble loading the dictionary