Package com.day.cq.spellchecker.spi
Interface SpellChecker
-
public interface SpellCheckerGeneric spellchecker interface, returned by aspellchecker provider.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancheck(java.lang.String word)Check a word against the spellchecker.intsuggest(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. Returntrueif 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
-
-