manpagez: man pages & more
info aspell
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 Spellchecking Individual Files

To use Aspell to spellcheck a file use:

 
aspell check [options] filename

at the command line where filename is the file you want to check and options is any number of optional options. Some of the more useful ones include:

–mode=mode

the mode to use when checking files. The available modes are none, url, email, sgml, tex, texinfo, nroff, among others. For more information on the various modes see Notes on Various Filters and Filter Modes.

–dont-backup

don’t create a backup file. Normally, if there are any corrections the Aspell utility will append ‘.bak’ to the existing file name and then create a new file with corrections made during spell checking.

–sug-mode=mode

the suggestion mode to use where mode is one of ultra, fast, normal, or bad-spellers. For more information on these modes see Notes on the Different Suggestion Modes.

–lang=name/-l name

the language the document is written in. The default depends on the current locale.

–encoding=name

encoding the document is expected to be in. The default depends on the current locale.

–master=name/-d name

the main dictionary to use.

–keymapping=name

the keymapping to use. Either ‘aspell’ for the default mapping or ‘ispell’ to use the same mapping that the Ispell utility uses.

For more information on the available options, please see Customizing Aspell.

For example to check the file ‘foo.txt’:

 
aspell check foo.txt

and to check the file ‘foo.txt’ using the ‘bad-spellers’ suggestion mode and the American English dictionary:

 
aspell check --sug-mode=bad-spellers -d en_US foo.txt

If the ‘mode’ option is not given, then Aspell will use the extension of the file to determine the current mode. If the extension is ‘.tex’, then ‘tex’ mode will be used, if the extension is ‘.html’, ‘.htm’, ‘.php’, or ‘.sgml’ it will check the file in ‘sgml’ mode, otherwise it will use ‘url’ mode.

For more information on the various modes that can be used, see Notes on Various Filters and Filter Modes.

If Aspell was compiled with curses support and the TERM environment variable is set to a capable terminal type then Aspell will use a nice full screen interface, otherwise it will use a simpler “dumb” terminal interface where the misspelled word is surrounded by two ’*’. In either case the interface should be self explanatory.

If Aspell is compiled with a version of the curses library that support wide characters then Aspell can also check UTF-8 text. Furthermore, the document will be displayed in the encoding defined by the current locale. This encoding does not necessarily have to be the same encoding that the document is in. This means that is is possible to check an 8-bit encoding such as ISO-8859-1 on an UTF-8 terminal. To do so simply set the ‘encoding’ option to ‘iso-8859-1’. Furthermore it is also possible to check an UTF-8 document on an 8-bit terminal provided that the document can be successfully converted into that encoding.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.