SpellChecking - Method / Technology
Engine - Aspell
How:
- Icon on CM invokes spellchecker method.
- Method sends hex encoded content to spellcheck service (AJAX)
- Service decodes and scans content for misspellings, marks each of these with a special span of class named 'w3spelltarget', identified by unique id.
- Service constructs list of suggested alternatives and places them in an xml container of with an attribute identifying the span id.
- Service re-encodes the content with added spans.
- Service construcs xml to send to the CM client, that has marked up content and lists of alternative spellings.
- Client replaces original content with span marked content from service.
- Client produces pop-up list of misspell candidates, along with combo choices from lists, edit boxes for manual change and OK buttons
- On User click of OK, client will replace ID'ed span with either the chosen combo choice or manually entered text.
- Dismissal of the popup will remove any remaining span tags.
Thats It!
Version 0.1 code
I have created a wrapper class that makes interfacing with aspell much easier.
I have an example program source file to use as an example, and as a starting point for more sophisticated code.
Here is the makefile.
You aslo need the aspell development environment which you can get here.
