|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.swabunga.spell.engine.SpellDictionaryASpell
public abstract class SpellDictionaryASpell
Container for various methods that any SpellDictionary
will use.
Based on the original Jazzy aspell port.
Constructor Summary | |
---|---|
SpellDictionaryASpell(java.io.File phonetic)
|
|
SpellDictionaryASpell(java.io.File phonetic,
java.lang.String encoding)
|
|
SpellDictionaryASpell(java.io.Reader phonetic)
|
Method Summary | |
---|---|
java.lang.String |
getCode(java.lang.String word)
Returns the phonetic code representing the word. |
java.util.List |
getSuggestions(java.lang.String word,
int threshold)
Returns a list of Word objects that are the suggestions to an incorrect word. |
boolean |
isCorrect(java.lang.String word)
Returns true if the word is correctly spelled against the current word list. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.swabunga.spell.engine.SpellDictionary |
---|
addWord |
Constructor Detail |
---|
public SpellDictionaryASpell(java.io.File phonetic) throws java.io.IOException
java.io.IOException
public SpellDictionaryASpell(java.io.File phonetic, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public SpellDictionaryASpell(java.io.Reader phonetic) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public java.util.List getSuggestions(java.lang.String word, int threshold)
getSuggestions
in interface SpellDictionary
word
- Suggestions for given mispelt wordthreshold
- The lower boundary of similarity to mispelt word
Word
public java.lang.String getCode(java.lang.String word)
public boolean isCorrect(java.lang.String word)
isCorrect
in interface SpellDictionary
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |