public class MappingDictionary extends TextDictionary implements Dictionary
AX AH IX IH
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_MAP_FILE |
addendaUrlList, allocated, dictionary, FILLER_TAG, fillerDictionaryFile, fillerWords, g2pDecoder, g2pMaxPron, g2pModelFile, logger, unitManager, wordDictionary, wordDictionaryFile
PROP_ADDENDA, PROP_DICTIONARY, PROP_FILLER_DICTIONARY, PROP_G2P_MAX_PRONUNCIATIONS, PROP_G2P_MODEL_PATH, PROP_UNIT_MANAGER, PROP_WORD_REPLACEMENT, SENTENCE_END_SPELLING, SENTENCE_START_SPELLING, SILENCE_SPELLING
Constructor and Description |
---|
MappingDictionary() |
MappingDictionary(java.net.URL mappingFile,
java.net.URL wordDictionaryFile,
java.net.URL fillerDictionaryFile,
java.util.List<java.net.URL> addendaUrlList,
java.lang.String wordReplacement,
UnitManager unitManager) |
Modifier and Type | Method and Description |
---|---|
void |
allocate()
Allocates the dictionary
|
protected Unit |
getCIUnit(java.lang.String name,
boolean isFiller)
Gets a context independent unit.
|
protected void |
loadMapping(java.io.InputStream inputStream) |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured.
|
deallocate, dump, getFillerDictionaryFile, getFillerWords, getSentenceEndWord, getSentenceStartWord, getSilenceWord, getWord, getWordDictionaryFile, loadDictionary, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
deallocate, getFillerWords, getSentenceEndWord, getSentenceStartWord, getSilenceWord, getWord
@S4String(mandatory=true, defaultValue="") public static final java.lang.String PROP_MAP_FILE
public MappingDictionary(java.net.URL mappingFile, java.net.URL wordDictionaryFile, java.net.URL fillerDictionaryFile, java.util.List<java.net.URL> addendaUrlList, java.lang.String wordReplacement, UnitManager unitManager)
public MappingDictionary()
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
newProperties
in class TextDictionary
ps
- a property sheet holding the new dataPropertyException
- if there is a problem with the properties.public void allocate() throws java.io.IOException
Dictionary
allocate
in interface Dictionary
allocate
in class TextDictionary
java.io.IOException
- if there is trouble loading the dictionaryprotected Unit getCIUnit(java.lang.String name, boolean isFiller)
getCIUnit
in class TextDictionary
name
- the name of the unitisFiller
- if true, the unit is a filler unitprotected void loadMapping(java.io.InputStream inputStream) throws java.io.IOException
java.io.IOException