public class JSpellDictionaryLocal extends JSpellDictionary
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
defaultDirectory
System default directory.
|
batchCount, batchSize, defaultCountry, defaultLanguage, defaultVersion, errors, language, learnWords, maxSuggestions, suggestions| Constructor and Description |
|---|
JSpellDictionaryLocal()
Constructor which accepts no parameters and sets the dictionary to the value of the defaultFile variable.
|
JSpellDictionaryLocal(java.lang.String directory,
Language language) |
JSpellDictionaryLocal(java.lang.String directory,
java.lang.String language,
java.lang.String country)
Creates and initializes the JSpellDictionaryLocal object with the directory, language and country of the local dictionary.
|
JSpellDictionaryLocal(java.lang.String directory,
java.lang.String language,
java.lang.String country,
java.lang.String version)
Creates and initializes the JSpellDictionaryLocal object with the directory, language and country of the local dictionary.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkWord(JSpellWordBundle word)
Accepts a JSpellWordBundle to be checked against the dictionary.
|
boolean |
checkWord(JSpellWordBundle word,
Suggestions suggestions)
Check a JSpellWordBundle.
|
void |
close()
Close the local dictionary.
|
int |
getBufferHit()
Get buffering statistics
|
int |
getBufferMiss()
Get buffering statistics
|
java.lang.String |
getDictionaryDirectory()
Returns the directory containing the JSpell dictionary.
|
void |
learnWord(java.lang.String word)
Persist a word to the dictionary file.
|
void |
open()
This method is called to open the local dictionary.
|
void |
removeWord(java.lang.String word)
Remove a word from the dictionary file.
|
void |
resetBufferStatistics()
Reset buffer statistics
|
void |
setDictionary(java.lang.String directory,
java.lang.String language,
java.lang.String country,
java.lang.String version)
Set the directory of the dictionary file, the language and country.
|
void |
setDictionaryFileName(java.lang.String dictionaryFileName)
Deprecated.
see setDictionaryDirectory
|
java.lang.String |
toString() |
boolean |
wordIsInIndex(java.lang.String wordToCheck)
Accepts a single word as a String.
|
adjustErrorPositions, checkCaps, checkCaps, getBatchSize, getCurrentError, getDictionaryCountry, getDictionaryLanguage, getDictionaryReady, getDictionaryVersion, getForceUpperCase, getIgnoreDoubleWords, getIgnoreFirstCaps, getIgnoreIrregularCaps, getIgnoreUpper, getIgnoreWordsWithNumbers, getLanguage, getLearnWords, getNextError, ignoreWord, init, isValidWord, learnWordManual, resetAll, resetErrors, setBatchSize, setDictionaryReady, setForceUpperCase, setIgnoreDoubleWords, setIgnoreFirstCaps, setIgnoreIrregularCaps, setIgnoreUpper, setIgnoreWordsWithNumbers, setLanguage, setLearnWords, setMaxSuggestions, validWordsPutpublic static java.lang.String defaultDirectory
public JSpellDictionaryLocal()
public JSpellDictionaryLocal(java.lang.String directory,
java.lang.String language,
java.lang.String country)
directory - directory containing the JSpell dictionary file.language - The language of the dictionary.country - The country of the dictionary.public JSpellDictionaryLocal(java.lang.String directory,
java.lang.String language,
java.lang.String country,
java.lang.String version)
directory - directory containing the JSpell dictionary file.language - The language of the dictionary.country - The country of the dictionary.version - The version of the dictionary, Medical, Legal, [custom].public JSpellDictionaryLocal(java.lang.String directory,
Language language)
public final void setDictionary(java.lang.String directory,
java.lang.String language,
java.lang.String country,
java.lang.String version)
directory - directory where the dictionary file is located.language - language of the dictionary.country - country of the dictionary.public final void setDictionaryFileName(java.lang.String dictionaryFileName)
dictionaryFileName - no longer used.public final java.lang.String getDictionaryDirectory()
public final void open()
public final void close()
public final boolean checkWord(JSpellWordBundle word, Suggestions suggestions) throws java.lang.Exception
word - a JSpellWordBundle object.suggestions - a Suggestions object.java.lang.Exception - an Exception object.public final boolean wordIsInIndex(java.lang.String wordToCheck)
wordToCheck - a String object.public final boolean checkWord(JSpellWordBundle word) throws java.lang.Exception
checkWord in interface JSpellDictionaryAccessorcheckWord in class JSpellDictionaryword - a JSpellWordBundle object.java.lang.Exception - an Exception object.public final void learnWord(java.lang.String word)
learnWord in interface JSpellDictionaryAccessorlearnWord in class JSpellDictionaryword - a String.public final void removeWord(java.lang.String word)
word - a String.public final void resetBufferStatistics()
public final int getBufferHit()
public final int getBufferMiss()
public java.lang.String toString()
toString in class java.lang.ObjectJSpell SDK - Spell Checker for the Java Platform
Copyright © 2009-2019 Page Scholar Inc, All Rights Reserved - https://www.jspell.com