public class JSpellIndex
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
trialDays |
static java.lang.StringBuffer |
version
Identifies JSpell dictionary version.
|
Constructor and Description |
---|
JSpellIndex()
Constructor for the JSpellIndex class.
|
JSpellIndex(java.lang.String path,
java.lang.String language,
java.lang.String country)
Constructs a JSpellIndex object.
|
JSpellIndex(java.lang.String path,
java.lang.String language,
java.lang.String country,
java.lang.String jdxversion)
Constructs a JSpellIndex object.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String word)
Add a word to the dictionary
|
void |
close()
Close access to the JSpellIndex.
|
int |
getBufferHit()
An int containing the number of buffer 'hits'.
|
int |
getBufferMiss()
An int containing the number of buffer 'misses'.
|
java.lang.String |
getIndexCountry()
Returns the country of this dictionary file.
|
java.lang.String |
getIndexLanguage()
Returns the language of this dictionary file.
|
java.lang.String |
getIndexPath()
Returns the location of this dictionary file.
|
boolean |
isIndexReady()
Returns the status of the JSpellIndex.
|
void |
remove(java.lang.String original)
Remove a word from the dictionary
|
void |
resetBufferStatistics()
Clear the number of buffer hits and misses.
|
boolean |
search(java.lang.String soundex,
java.lang.String original,
java.lang.String[] suggestions)
Overloaded to call search with true, get suggestions.
|
boolean |
search(java.lang.String soundex,
java.lang.String original,
java.lang.String[] suggestions,
boolean getSuggestions)
Search for a given word and soundex code and optionally return suggestions.
|
boolean |
search(java.lang.String original,
Suggestions suggestions,
boolean specialCase,
boolean forceUpperCase)
Wraps the search(String, String, String[]) method and performs additional search using lower case word if the original word
passed begins with an upper case letter.
|
public static java.lang.StringBuffer version
public final int trialDays
public JSpellIndex()
public JSpellIndex(java.lang.String path, java.lang.String language, java.lang.String country)
path
- location of this dictionary file.language
- language of this dictionary file.country
- country of this dictionary file.public JSpellIndex(java.lang.String path, java.lang.String language, java.lang.String country, java.lang.String jdxversion)
path
- location of this dictionary file.language
- language of this dictionary file.country
- country of this dictionary file.jdxversion
- Medical, Legal, Other, specify as string, becomes part of filenamepublic int getBufferHit()
public int getBufferMiss()
public void resetBufferStatistics()
public java.lang.String getIndexLanguage()
public java.lang.String getIndexCountry()
public java.lang.String getIndexPath()
public final void close()
public final boolean isIndexReady()
public final void add(java.lang.String word)
word
- a String representing an individual word.public final void remove(java.lang.String original)
original
- a String representing an individual word.public final boolean search(java.lang.String original, Suggestions suggestions, boolean specialCase, boolean forceUpperCase) throws java.io.IOException
original
- a String representing a word.suggestions
- a Suggestions object.specialCase
- true or false, should word be proper.forceUpperCase
- true or false, should word be UPPER CASE.java.io.IOException
- an Exception object.public boolean search(java.lang.String soundex, java.lang.String original, java.lang.String[] suggestions) throws java.io.IOException
soundex
- a String representing the phonetic code.original
- a String representing the original word.suggestions
- a Suggestions object.java.io.IOException
- an Exception object.public boolean search(java.lang.String soundex, java.lang.String original, java.lang.String[] suggestions, boolean getSuggestions) throws java.io.IOException
getSuggestions
- true or false, return suggestions?soundex
- a String representing a phonetic code.original
- a String representing the original word.suggestions
- a Suggestions object.java.io.IOException
- an Exception object.JSpell SDK - Spell Checker for the Java Platform
Copyright © 2009-2019 Page Scholar Inc, All Rights Reserved - https://www.jspell.com