|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.swabunga.spell.engine.SpellDictionaryASpell
com.swabunga.spell.engine.SpellDictionaryDichoDisk
com.swabunga.spell.engine.SpellDictionaryCachedDichoDisk
public class SpellDictionaryCachedDichoDisk
Yet another SpellDictionary
this one is based on Damien Guillaume's
Diskbased dictionary but adds a cache to try to improve abit on performance.
Field Summary | |
---|---|
static int |
codes
|
static int |
hits
|
static java.lang.String |
JAZZY_DIR
|
static java.lang.String |
PRE_CACHE_FILE_EXT
|
Fields inherited from class com.swabunga.spell.engine.SpellDictionaryASpell |
---|
tf |
Constructor Summary | |
---|---|
SpellDictionaryCachedDichoDisk(java.io.File wordList)
Dictionary Convienence Constructor. |
|
SpellDictionaryCachedDichoDisk(java.io.File wordList,
java.io.File phonetic)
Dictionary constructor that uses an aspell phonetic file to build the transformation table. |
|
SpellDictionaryCachedDichoDisk(java.io.File wordList,
java.io.File phonetic,
java.lang.String encoding)
Dictionary constructor that uses an aspell phonetic file to build the transformation table. |
|
SpellDictionaryCachedDichoDisk(java.io.File wordList,
java.lang.String encoding)
Dictionary Convienence Constructor. |
Method Summary | |
---|---|
void |
addWord(java.lang.String word)
Add a word permanantly to the dictionary (and the dictionary file). |
void |
clearCache()
Clears the cache. |
java.util.List |
getWords(java.lang.String code)
Returns a list of strings (words) for the code. |
void |
saveCache()
Saves the current cache to file. |
Methods inherited from class com.swabunga.spell.engine.SpellDictionaryASpell |
---|
getCode, getSuggestions, getSuggestions, isCorrect |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int hits
public static int codes
public static final java.lang.String JAZZY_DIR
public static final java.lang.String PRE_CACHE_FILE_EXT
Constructor Detail |
---|
public SpellDictionaryCachedDichoDisk(java.io.File wordList) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public SpellDictionaryCachedDichoDisk(java.io.File wordList, java.lang.String encoding) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public SpellDictionaryCachedDichoDisk(java.io.File wordList, java.io.File phonetic) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public SpellDictionaryCachedDichoDisk(java.io.File wordList, java.io.File phonetic, java.lang.String encoding) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
Method Detail |
---|
public void addWord(java.lang.String word)
addWord
in interface SpellDictionary
addWord
in class SpellDictionaryDichoDisk
word
- The word to add.public void clearCache()
public java.util.List getWords(java.lang.String code)
getWords
in class SpellDictionaryDichoDisk
code
- The phonetic code common to the list of words
public void saveCache() throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |