Spellcheck package
| From: | Nikolas 'Atrus' Coukouma | Date: | Tue, 12 Oct 2004 23:28:51 +0000 |
| Subject: | Spellcheck package | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-33809@lists.php.net to get a copy of this message | ||
I've been working on wrapping spellchecking functions in objects. The obvious advantage is not having to remember calls to *_free functions.
I'm also planning to add functions for getting suggestions for whole strings (space-delimited words). It would return an associative array of suggestions with the misspelled words as keys and arrays of suggestions as values. Additionally, I think a function for 'highlighting' misspelled words by inserting stings before and after each misspelled word (i.e. '<b>' before and '</b>' after). Suggestions for other commonly useful functions are welcome.
I'm currently basing the design on libenchant's interface. For convenience, it'll have a pspell (actually aspell) backend as a default, which can be switched for enchant, if it's available.
Does this seem like a good addition to PEAR?
Nikolas 'Atrus' Coukouma