Spellchecker code available
I’ve been asked privately whether the code of spellchecker service run on the W3C site was available; it wasn’t, but now it is, along with tidy on-line and HTTP HEAD services code.
The spellchecker uses a fairly simple Python wrapper around aspell, that:
- allows to pick the language of the document being spell checked – ideally, this would be autodetected in the HTTP headers (
Content-Language) and in the HTML document itself (with thelang/xml:langattributes) - presents the errors found, and optionally the possible corrections
- links to a different form (whose code hasn’t been released yet) to add words in the local dictionary