Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ spell(1) — 4.2BSD 3.04v10.B

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

deroff(1)

sort(1)

tee(1)

sed(1)

look(1)

SPELL(1)  —  Unix Programmer’s Manual

NAME

spell, spellin, spellout − find spelling errors

SYNOPSIS

spell [ options ] [ files ]

spellin [ list ]

spellout [ −d ] list

DESCRIPTION

The spell command collects words from the named documents, and looks them up in a spelling list.  Words which do not occur on the spelling list, and which cannot be derived from those on the list, are printed on the standard output.  (Derivability is tested by the validity of applying certain inflections, prefixes or suffixes.)  If no files are named, words are collected from the standard input. 

Spell ignores most troff, tbl and eqn(1) constructions. 

OPTIONS

−b Checks British spelling.  Besides preferring “centre,” “colour,” “speciality,” “travelled,” etc., this option insists upon “-ise” in words like “standardise,” despite Fowler and the OED. 

−d list Uses list as dictionary.  The default is /usr/dict/hlist[ab].  (The spellout option −d is described below.) 

−h hfile Copies of all output may be accumulated in the history file.  With this option, output is accumulated in hfile.  (The default is /dev/null.) 

−s slist The stop list filters out misspellings that would otherwise pass (e.g., thier=thy−y+ier).  With this option, slist is used as the stop list.  (Default is /usr/dict/hstop.) 

−v Prints words not in list and derivations.  That is, all words not literally in the spelling list are printed, and plausible derivations from spelling list words are indicated. 

−x Prints possible stems for each word.  Every plausible stem is printed with “=” for each word. 

The spelling list is based on many sources.  Although it is more haphazard than an ordinary dictionary, it is more effective with proper names and popular technical words.  Coverage of the specialized vocabularies of biology, medicine and chemistry is light. 
 

Two routines, spellin and spellout, help maintain the hash lists used by spell.  Both expect a set of words, one per line, from the standard input. 

Spellin combines the words from the standard input and the pre-existing list file, and places a new list on the standard output.  If no list file is specified, the new list is created from scratch. 

Spellout looks up each word from the standard input and prints on the standard output those that are missing from the hashed list file (or present on it, with option −d). 

EXAMPLE

For example, to verify that “hookey” is not on the default spelling list, the user can add it to his or her private list, and then use it with spell, as follows:

echo  hookey  |  spellout  /usr/dict/hlista
echo  hookey  |  spellin  /usr/dict/hlista  >  myhlist
spell  −d  myhlist  huckfinn

FILES

/usr/dict/hlist[ab]hashed spelling lists, American & British, default for −d
/usr/dict/hstophashed stop list, default for −s
/dev/nullhistory file, default for −h
/tmp/spell.$$∗temporary files
/usr/lib/spell

SEE ALSO

deroff(1), sort(1), tee(1), sed(1), look(1)

BUGS

The spelling list’s coverage is uneven; new installations will probably wish to monitor the output for several months to gather local additions.  British spelling was done by an American. 

INTEGRATED SOLUTIONS 4.2 BSD  —  1 August 1985

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026