Package Proposal: SpellChecker

From: Date: Fri, 08 Aug 2003 13:21:25 +0000
Subject: Package Proposal: SpellChecker
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19399@lists.php.net to get a copy of this message
I did a quick package search on 'spell' on pear.php.net and found no entries so I figured I'd offer a small class I drew up this week for spell checking in PHP. It does require --with-pspell to be installed. Quick feature run down: 1) Supports any languages supported by pspell/aspell. 2) Supports personalized word lists 3) Supports highlighting of misspelled words in text that is checked - Highlight method is customizable. Default is to use a <span> with yellow background 4) Can return suggested spellings of mispelled words. - By default the <span> tag that does the highlight sticks suggestions in title attribute
      allowing them to be viewed by simply hovering the mouse over it
   - If default behavior isn't desired, methods exist to grab the suggestions and do custom
     handling
5) Works fine with HTML/XML
    - This is done by saving copy of the original text we are checking and then stripping out
       HTML/XML, doing the spell check and replacing the mispellings in the original text
6) Goes without saying but it is a lightweight and OO and should plugin easily to existing
applicaitons Only down side is you will probably spend more time getting aspell/pspell working and recompiling PHP than you will with trying to implement it. If accepted I'd seek the proper PEAR category to put it in, I was thinking Tools and Utilities but I'd be open to suggestions. --Tony

« previous php.pear.dev (#19399) next »