DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

spell(C)


spell, hashmake, spellin, hashcheck -- find spelling errors

Syntax

spell [ -bilvx ] [ +local_file ] [ file ... ]

/usr/lib/spell/hashmake

/usr/lib/spell/spellin n

/usr/lib/spell/hashcheck spelling_list

Description

spell collects words from the named files and looks them up in a spelling list. Words that neither occur among nor are derivable (by applying certain inflections, prefixes, and/or suffixes) from words in the spelling list are printed on the standard output. If no files are named, words are collected from the standard input.

spell ignores most troff, tbl, and eqn constructions.

spell recognizes the following options:


-b
British spelling is checked. Besides preferring centre, colour, labour, programme, speciality, traveled, and so on, this option insists upon the -ise ending for words like standardise.

-i
Ignore all chains of included files.

-l
Follow the chains of all included files. By default, spell follows chains of included files (.so and .nx troff requests), unless the names of such included files begin with /usr/lib.

-v
Print all words not literally in the spelling list, and indicates plausible derivations from the words in the spelling list.

-x
Print every plausible stem with ``='' for each word.

+local_file
Remove words found in local_file from spell's output. local_file is the name of a user-provided file that contains a sorted list of words, one per line. With this option, you can specify a set of words that are correct spellings for each job (in addition to spell's own spelling list).
The spelling list is based on many sources, and while more haphazard than an ordinary dictionary, it is also more effective with respect to proper names and popular technical words. Coverage of the specialized vocabularies of biology, medicine, and chemistry is light.

Pertinent auxiliary files may be specified by name arguments, indicated below with their default settings (see ``Files''). Copies of all output are accumulated in the history file. The stop list filters out misspellings (for example, thier=thy-y+ier) that would otherwise pass.

Three routines help maintain and check the hash lists used by spell:


hashmake
Reads a list of words from the standard input and writes the corresponding nine-digit hash codes on the standard output.

spellin n
Reads n hash codes from the standard input and writes a compressed, or hashed spelling_list such as /usr/lib/spell/hlista or /usr/lib/spell/hlistb, on the standard output. Information about the hash coding is printed on standard error.

hashcheck
Reads a compressed, or hashed spelling_list, such as /usr/lib/spell/hlista or /usr/lib/spell/hlistb, and recreates the nine-digit hash codes for all the words in it, writing these codes on the standard output.

Examples

The following example adds the words in newwords to the on-line dictionary (/usr/lib/spell/hlista).
   cd /usr/lib/spell
   cat newwords | ./hashmake | sort -u > newcodes
   cat hlista | ./hashcheck > hashcodes
   cat newcodes hashcodes | sort -u > newhash
   cat newhash | ./spellin `cat newhash | wc -l` > hlist
   mv hlista hlista.00
   mv hlist hlista
Remember to remove all temporary files after you are sure everything works.

Note that when you are manipulating large text, hash and hash code files, you should use cat(C) to open the files, since they may be extremely large.

Limitations

The spelling list coverage is uneven; new installations will probably wish to monitor the output for several months to gather local additions; typically, these are kept in a separate local file that is added to the hashed spelling_list via spellin.

By default, logging of errors to /usr/lib/spell/spellhist is turned on.

D_SPELL and S_SPELL can be overridden by placing alternate definitions in your environment.

Files


D_SPELL=/usr/lib/spell/hlist[ab]
hashed spelling lists, American & British

S_SPELL=/usr/lib/spell/hstop
hashed stop list

H_SPELL=/usr/lib/spell/spellhist
history file

/usr/lib/spell/spellprog
program

See also

sed(C), sort(C), tee(C)

Standards conformance

spell is conformant with:

AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992: note that this command is marked as to be withdrawn.


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003