SpellDictionary
public class OpenOfficeSpellDictionary extends java.lang.Object implements SpellDictionary
Constructor | Description |
---|---|
OpenOfficeSpellDictionary(java.io.File dictFile,
java.io.File affFile) |
|
OpenOfficeSpellDictionary(java.io.File dictFile,
java.io.File affFile,
boolean inBackground) |
|
OpenOfficeSpellDictionary(java.io.InputStream zipStream,
java.io.File personalDict) |
|
OpenOfficeSpellDictionary(java.io.InputStream zipStream,
java.io.File personalDict,
boolean inBackground) |
|
OpenOfficeSpellDictionary(java.util.zip.ZipFile zipFile) |
|
OpenOfficeSpellDictionary(java.util.zip.ZipFile zipFile,
boolean inBackground) |
Modifier and Type | Method | Description |
---|---|---|
void |
addWord(java.lang.String word) |
Add a word permanently to the dictionary.
|
java.util.List<java.lang.String> |
getSuggestions(java.lang.String word) |
Returns a list of String that are the suggestions to any word.
|
boolean |
isCorrect(java.lang.String word) |
Returns true if the word is correctly spelled against the dictionary.
|
public OpenOfficeSpellDictionary(java.util.zip.ZipFile zipFile) throws java.io.IOException
java.io.IOException
public OpenOfficeSpellDictionary(java.util.zip.ZipFile zipFile, boolean inBackground) throws java.io.IOException
java.io.IOException
public OpenOfficeSpellDictionary(java.io.InputStream zipStream, java.io.File personalDict) throws java.io.IOException
java.io.IOException
public OpenOfficeSpellDictionary(java.io.InputStream zipStream, java.io.File personalDict, boolean inBackground) throws java.io.IOException
java.io.IOException
public OpenOfficeSpellDictionary(java.io.File dictFile, java.io.File affFile) throws java.io.IOException
java.io.IOException
public OpenOfficeSpellDictionary(java.io.File dictFile, java.io.File affFile, boolean inBackground) throws java.io.IOException
java.io.IOException
public void addWord(java.lang.String word) throws SpellDictionaryException
SpellDictionary
addWord
in interface SpellDictionary
word
- a word to add.SpellDictionaryException
public boolean isCorrect(java.lang.String word)
SpellDictionary
isCorrect
in interface SpellDictionary
word
- a word to check.public java.util.List<java.lang.String> getSuggestions(java.lang.String word)
SpellDictionary
getSuggestions
in interface SpellDictionary
word
- the word that we want to get a list of spelling suggestions for.