Helper class for spellchecking with Googielspell and PSpell support.
package |
Framework |
---|---|
subpackage |
Utils |
__construct(string $lang = 'en')
string
Language code
languages()
check(string $text, bool $is_html = false) : bool
string
Text content for spellchecking
bool
Enables HTML-to-Text conversion
bool
True when no mispelling found, otherwise false
found() : int
int
Number of mispellings
get_suggestions(string $word) : array
string
The word
array
Suggestions list
get_words(string $text = null, $is_html = false) : array
string
The content for spellchecking. If empty content
used for check() method will be used.
array
List of misspelled words
get_xml() : string
string
XML content
get() : array
array
Spellchecking result. An array indexed by word.
error() : string
string
Error message
html2text($text)
is_exception(string $word) : bool
string
The word
bool
True if the word is an exception, False otherwise
add_word(string $word)
string
The word to add
remove_word(string $word)
string
The word to remove
update_dict()
load_dict()
matches :
engine :
backend :
lang :
rc :
error :
dict :
have_dict :