Module 123 spell

Previous Table of Contents Next


Module 123
spell

DESCRIPTION

The external spell command checks input for spelling errors. It compares the words it reads from input to words in its spelling list. If a word is not located in its list, then the word is printed on the standard output. spell adds suitable prefixes, suffixes, and inflections to derive the correct spelling of a word.

Most troff , nroff , tbl , eqn , and pic constructions are ignored by spell . The deroff command is executed by spell to remove these constructs.

By default spell follows chains of troff and nroff include files. Include files are preceded by .so or .nx constructs. If the filename begins with /usr/lib, spell ignores the file and does not read it. Most /usr/lib files are mm macros created by vendors , not by users. If the -l option is specified, then all include files are read, even the /usr/lib files.

The spelling list file was created from many sources. Although it is not a Webster s Dictionary, it is very effective with respect to proper names and technical words. Unfortunately, the coverage of special professions such as biology, chemistry , and medicine is lacking to say the least.

The hashmake command converts a list of words to a list of nine-digit hash codes. The list of words are read from the standard input. The list of hash codes are written to the standard output. The output of hashmake is an intermediate file used by spellin to create the final spelling list ( hlist ).

The spellin command converts hash codes to a hashed compressed spelling list. The hash codes are read from the standard input. The compressed spelling list is written to the standard output. The output of spellin is the final spelling list used by spell ; the file is referred to as the hlist .

The hashcheck command converts a compressed spelling list to a list of hash codes. The compressed spelling list is read from the standard input. The hash code list is written to the standard output. You use the hashcheck command to verify that the compressed spelling list is valid.


BSD (Berkeley)
The spellin command creates a hashed compressed spelling list. The ASCII word list is read from the standard input. If a filename is given it is assumed to be an existing spelling list file ( hlist ). The output, a new or updated spelling list, is written to the standard output.
The spellout command searches the given hashed spelling list ( hlist ) for each word read from the standard input. If the list does not contain one of the input words, the word is written to the standard output. With the -d option specified, the word is written to the standard output if it does exist in the hashed list.

COMMAND FORMAT

Following is the general format of the spell command.

 spell [ -blvx ] [ +local_file ] [ file_list ]      /usr/lib/spell/hashmake      /usr/lib/spell/spellin n      /usr/lib/spell/hashcheck word_list 

BSD (Berkeley)
spell [ -bvx ] [ -d hlist ] [ -h spellhist ] [ -s hstop ] [ file ]
spellin [ list ]
spellout [ -d ] list

Most users only use the spell command. The other commands are usually used by the system administrator to add words to the spelling list.

Options

The following list describes the options and their arguments that may be used to control how spell functions.

-b Check for British spelling. The ise ending is required in words such as standardize . Such spelling as colour and centre are checked.
-l Causes the files referenced in a troff document to be read even if their pathname begins with /usr/lib. Normally spell will check the spelling of chained files in a troff document, unless the pathname of the file begins with /usr/lib. Chained files are .so and .nx requests in a troff document.
-v Displays all words not literally in the spelling list. All reasonable alternative words are displayed if any exist.
-x Displays possible stems , prefixed with an equal sign (=), for each word being checked.
+ local_file Words listed in local_file are removed from spell s output of misspelled words. The local_file contains a sorted list of words, one per line. You can use this file to store a list of correctly spelled words unknown to the normal spelling list ( hlist ).

BSD (Berkeley)
-d hlist Use hlist as the spelling list file instead of the default. The default is /usr/dict/hlist[ab].
-h spellhist Use spellhist as the history file instead of the default. The default is /dev/null. The history file contains a copy of all words spelled incorrectly according to spell.
-s hstop Use hstop as the stop list file instead of the default. The default is /usr/dict/hstop.
See the following section Control Files for definitions of these three files.

Arguments

The following list describes the arguments that may be passed to the spell command.

file_list One or more files read and each word checked for correct spelling.
If no files are listed the standard input is read for words.


Previous Table of Contents Next

Copyright Wordware Publishing, Inc.


Illustrated UNIX System V
Illustrated Unix System V/Bsd
ISBN: 1556221878
EAN: 2147483647
Year: N/A
Pages: 144
Authors: Robert Felps

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net