The Aspell utility is a multipurpose utility that can function as a ``ispell -a'' replacement, as an independent spell checker, as a test utility to test out Aspell features, and as a utility for managing dictionaries. Here is a brief summary of Aspell's command line options.
aspell <command> [file] [options]
<command> is one of:
If Aspell is specified with out any command line options it will display a brief help screen and quit.
Aspell will also make use of the the following environmental variables.
To actually use Aspell as an Ispell replacement simply follow the directions in section 2.6.
When given the pipe or -a command aspell goes into a pipe mode the is compatible with ispell with a few extra additions.
In this mode, Aspell prints a one-line version identification message, and then begins reading lines of input. For each input line, a single line is written to the standard output for each word checked for spelling on the line. If the word was found in the main dictionary, or your personal dictionary, then the line contains only a '*'.
If the word is not in the dictionary, but there are suggestions, then the line contains an '&', a space, the misspelled word, a space, the number of near misses, the number of characters between the beginning of the line and the beginning of the misspelled word, a colon, another space, and a list of the suggestions separated by commas and spaces.
Finally, if the word does not appear in the dictionary, and there are no suggestions, then the line contains a '#', a space, the misspelled word, a space, and the character offset from the beginning of the line. Each sentence of text input is terminated with an additional blank line, indicating that ispell has completed processing the input line.
These output lines can be summarized as follows:
To summarize these:
In addition to the above commands which are designed for Ispell compatibility Aspell also supports its own extension. All Aspell extensions follow the following format.
$$<command> [data]Where data may are may not be required depending on the particular command. Aspell currently supports the following command.
<num of items>: <item1>, <item2>, <etc>(Note: part of this section was directly copied out of the Ispell manual)
As of version .27 of Aspell storing replacements pairs has a memory. Which means if you first store the replacement pair:
sicolagest -> psycolagestthen store the replacement pair
psycolagest -> psychologistThe replacement pair
sicolagest -> psychologistwill also get stored so that you don't have to worry about it.
To use Aspell as an independent spell checker type
aspell check <filename>Where <filename> is the file you want to check. Aspell will create a new file named <filename>.checked with the corrections and the original file is untouched.
In Aspell's test mode you can test out Aspell's individual features as well and get some idea if the speed at which aspell runs. To go into test mode simply type
aspell test
Normally the word list is automatically created for you when you type make however if you wish to use your own you will need to use aspell to probably prepare it. The format for the command is:
aspell master <base> or
aspell personal <base>where <base> is the root name of the word list to be created. Unless you have a special reason it should be ``english''. Aspell gets it word list from stdin. For example the make creates the default word list with the command:
aspell master english < english.wlOnce the word list is created you need to move the files <base>.wrd and <base>.mta to a place where Aspell can find it. This is normally /usr/local/share/aspell.
The personal dictionary can be created in almost the same way except that the file is named <base>.per and it should be either in the current directory or the users home directory in order for Aspell to find it. Unless you have a good reason <base> should normally be ``.aspell''.
Please note that Aspell currently does not currently support any affix compression like Ispell does. Thus Ispell's word list will not work as is. In order to use Ispell's word lists simply pipe the word list through ``ispell -e'' (or ispell.real -e if you renamed it) to expand the munched word lists.
See section 5.2.1.