Package com.day.cq.spellchecker.spi
Interface SpellChecker
-
public interface SpellChecker
Generic spellchecker interface, returned by aspellchecker provider
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
check(java.lang.String word)
Check a word against the spellchecker.int
suggest(java.lang.String word, java.lang.String[] suggestions)
Return spelling suggestions for a word.
-
-
-
Method Detail
-
check
boolean check(java.lang.String word)
Check a word against the spellchecker. Returntrue
if the word is correct, elsefalse
- Parameters:
word
- word to check- Returns:
- a flag indicating, whether the word is correct
-
suggest
int suggest(java.lang.String word, java.lang.String[] suggestions)
Return spelling suggestions for a word. Takes a word and an empty suggestion list as arguments. Returns the number of suggestions found and filled into the suggestion list.- Parameters:
word
- word to find suggestions forsuggestions
- list of suggestions to be filled- Returns:
- number of suggestions found and filled into the suggestions array
-
-