spell - scan a file for misspelled words
spell [ -b[dict]] [-c|-x] [-v] [-i] [-s dict] [ file ... ]
spell reads in a file and splits it into words, then compares each unique word with a dictionary file (all comparisons and reporting are done in lower case). The "misspelled" words are printed on standard output.
The options are as follows:
Use alternate dictionary (as specified in the variable at the top of the script, you should change this to represent your system).
Use file as the alternate dictionary (notice no space between flag and file). This file is used instead of the standard dictionary. This could be a British spelling list, or for a different language.
Check the dictionary for "close" matches. Each misspelled word will be followed by a list of indented close matches. A close match is one where it matches a word in the dictionary if 1 character is deleted, or 1 letter is added, or any 2 adjacent characters are swapped.
Same as -c above.
Show suffix expansion. Some words are inferred by modifying words in the dictionary, this shows you how that was done on some of your words, so you can double check if it did it right.
Use interactively. Prompts for words, processes words after each line, instead of after whole file(s), and quit at first blank line (do not use on a file, this is for typing in words from standard in). Also prints descriptive titles and has a very basic pager.
Specify supplemental dictionary. This dictionary is used in addition to the base word list. The space before the file is optional. Multiple files can be used, but each needs its own -s flag.
Multiple flags can be combined, but -b and -s must come last, i.e. "spell -icvb" instead of "spell -i -c -v -b", and can be specified in any order.
If a file is not specified, it reads from standard input. Use the -i switch if you are going to type words in by hand.
I did not create a word list, but found one without restriction (compiled for linux) at: ftp://ftp.cs.unc.edu/pub/users/faith/linux/linux.words.2.tar.gz.
This program is only as good as your word list (and maybe not that good, use the -v switch at least once). I did not compile the word list and cannot vouch for it. Remember this is a tool and not a replacement for your own thinking. Anyone who depends wholly on a spell checker without doing their own proofreading, deserves what they get (or worse), I accept no liability for any consequences of using this program.
This program only finds the misspelled words, it is up to you to decide if they are really wrong and replace them yourself.
My focus in writing this program was portability, therefore I did not use some things that may have speeded things up, however perl itself is quick enough that it still does pretty good even with the slower method.
I know of no bugs at this time. There are a couple of things that may make it run a bit faster and the documentation may be made a little clearer.
Gregory L. Snow, (Greg), firstname.lastname@example.org
This program is copyright (c) Gregory L. Snow 1999.
This program is free and open software. You may use, modify, or distribute this program (with or without modifications) to your hearts content. However I take no responsibility for your use or misuse of this program.
To install PerlPowerTools, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.