Forum > General

Spelling, another approach


Just an idea I have established is worth sharing.

For a while now I have been working on Lazarus's collection of examples, mainly adding a metadata file to each and every one, over 200 so far. The metadata includes a "Desc" field, a few sentences of plaintext. And I am a terrible speller.  I considered running it through a normal spell checker but the content is full of programing "made up words" that will trigger false alarms.

Debian have another system, all packages accepted into Debian are subject to a Lintian spell check, instead of comparing each word with one in a standard dictionary, Debian maintains a list of words that are often misspelt, 10K of them. Now, I found that Lintian only works on packages but the list of words itself is included in the lintian package.

So, i made a unit that loads those Lintian words (and their corrected versions) into a TStringList and a bit of code that compares the content of a passed string and reports on the result. Works for me, very simple and a bit slow. Unit attached and, maybe the idea will be useful for someone else ?

At least I know my (very small) contribution to Lazarus won't trigger a storm of Lintian errors !


PS, yes, it found eight spelling mistakes !

I can see that being generally useful: I'm a bit of a stickler for thorough and verbose commenting, and just the other day I was looking at an obvious misspelling and idly wondering "why isn't there a wiggly line under that?".



[0] Message Index

Go to full version