Annotation of src/usr.bin/spell/spell.1, Revision 1.2
1.2 ! millert 1: .\" $OpenBSD: spell.1,v 1.1 2002/03/01 22:01:11 millert Exp $
1.1 millert 2: .\"
3: .\" Copyright (C) 1985, 1993, 1994
4: .\" The Regents of the University of California. All rights reserved.
5: .\"
6: .\" Redistribution and use in source and binary forms, with or without
7: .\" modification, are permitted provided that the following conditions
8: .\" are met:
9: .\" 1. Redistributions of source code must retain the above copyright
10: .\" notice, this list of conditions and the following disclaimer.
11: .\" 2. Redistributions in binary form must reproduce the above copyright
12: .\" notice, this list of conditions and the following disclaimer in the
13: .\" documentation and/or other materials provided with the distribution.
14: .\" 3. All advertising materials mentioning features or use of this software
15: .\" must display the following acknowledgement:
16: .\" This product includes software developed by the University of
17: .\" California, Berkeley and its contributors.
18: .\" 4. Neither the name of the University nor the names of its contributors
19: .\" may be used to endorse or promote products derived from this software
20: .\" without specific prior written permission.
21: .\"
22: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32: .\" SUCH DAMAGE.
33: .\"
34: .\" Copyright (C) Caldera International Inc. 2001-2002.
35: .\" All rights reserved.
36: .\"
37: .\" Redistribution and use in source and binary forms, with or without
38: .\" modification, are permitted provided that the following conditions
39: .\" are met:
40: .\" 1. Redistributions of source code and documentation must retain the above
41: .\" copyright notice, this list of conditions and the following disclaimer.
42: .\" 2. Redistributions in binary form must reproduce the above copyright
43: .\" notice, this list of conditions and the following disclaimer in the
44: .\" documentation and/or other materials provided with the distribution.
45: .\" 3. All advertising materials mentioning features or use of this software
46: .\" must display the following acknowledgement:
47: .\" This product includes software developed or owned by Caldera
48: .\" International, Inc.
49: .\" 4. Neither the name of Caldera International, Inc. nor the names of other
50: .\" contributors may be used to endorse or promote products derived from
51: .\" this software without specific prior written permission.
52: .\"
53: .\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
54: .\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
55: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
56: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
57: .\" IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT,
58: .\" INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
59: .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
60: .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
61: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
62: .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
63: .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
64: .\" POSSIBILITY OF SUCH DAMAGE.
65: .\"
66: .\" @(#)spell.1 8.2 (Berkeley) 4/18/94
67: .\"
68: .Dd April 18, 1994
69: .Dt SPELL 1
70: .Os
71: .Sh NAME
72: .Nm spell
73: .Nd find spelling errors
74: .Sh SYNOPSIS
75: .Nm spell
76: .Op Fl biltvx
77: .Op Fl d Ar list
78: .Op Fl h Ar spellhist
79: .Op Fl s Ar stop
80: .Op + Ns Ar extra_list
81: .Op Ar file ...
82: .Sh DESCRIPTION
83: .Nm spell
84: collects words from the named documents and looks them up in a spelling list.
85: Words that neither occur among nor are derivable (by applying certain
86: inflections, prefixes or suffixes) from words in the spelling list
87: are printed on the standard output.
88: .Pp
89: If no files are named, words are collected from the standard input.
90: .Nm
91: ignores most
92: .Xr troff 1 ,
93: .Xr tbl 1 ,
94: .Xr eqn 1
95: and
96: .Xr pic 1
97: constructions.
98: Copies of all output may be accumulated in the history file,
99: if one is specified.
100: .Pp
101: By default,
102: .Nm
103: (like
104: .Xr deroff 1 )
105: follows chains of included files (`.so' and `.nx' commands).
106: .Pp
107: The default spelling list is based on Webster's Second International
108: dictionary and should be fairly complete.
109: Words that appear in the
110: .Dq stop list
111: are immediately flagged as misspellings, regardless of whether or not
112: they exist in one of the word lists.
113: This helps filter out misspellings (e.g. thier=thy\-y+ier)
114: that would otherwise pass.
115: Additionally, the
116: .Pa british
117: file is also used as a stop list unless the
118: .Fl b
119: option is specified.
120: .Pp
121: Site administrators may add words to the local word list,
122: .Pa /usr/local/share/dict/words
123: or the local stop list,
124: .Pa /usr/local/share/dict/stop .
125: .Pp
126: All word (and stop) lists must be sorted in lexigraphical order
127: with case folded.
128: The simplest way to achieve this is to use
1.2 ! millert 129: .Dq sort -df .
1.1 millert 130: If the word files are incorrectly sorted,
131: .Nm
132: will not be able to operate correctly.
133: .Pp
134: The options are as follows:
135: .Bl -tag -width Ds
136: .It Fl b
137: Check British spelling.
138: Besides preferring
139: .Em centre , colour , speciality , travelled ,
140: etc., this option insists upon
141: .Fl ise
142: in words like
143: .Em standardise ,
144: Fowler and the OED to the contrary notwithstanding.
145: In this mode, American variants of words are added to the stop list.
146: .It Fl i
147: Instruct
148: .Xr deroff 1
149: to ignore `.so' and `.nx' commands.
150: .It Fl l
151: Use
152: .Xr delatex 1
153: instead of
154: .Xr deroff 1
155: if it is present on the system.
156: .It Fl t
157: Use
158: .Xr detex 1
159: instead of
160: .Xr deroff 1
161: if it is present on the system.
162: .It Fl v
163: Print all words not literally in the spelling list in addition to
164: plausible derivations from spelling list words.
165: .It Fl x
166: Print every plausible stem, prefixed with `='.
167: .It Fl d Ar word_list
168: Use the specified word list instead of the default system word list.
169: The word list must be sorted as specified above.
170: .It Fl h Ar spellhist
171: Store misspelled words in the specified history file.
172: The output of
173: .Li who -m
174: is appended to the history file after the list of misspelled words.
175: .It Fl s Ar stop_list
176: Use the specified stop list instead of the default system stop list.
177: The stop list must be sorted as specified above.
178: .It + Ns Ar extra_list
179: Use
180: .Ar extra_list
181: in addition to the default word list.
182: The extra word list must be sorted as specified above.
183: .El
184: .Sh FILES
185: .Bl -tag -width /usr/local/share/dict/wordsxx -compact
186: .It Pa /usr/share/dict/words
187: Default spelling list
188: .It Pa /usr/share/dict/american
189: American spelling of certain words
190: .It Pa /usr/share/dict/british
191: British spelling of certain words
192: .It Pa /usr/share/dict/stop
193: Default stop list.
194: .It Pa /usr/local/share/dict/words
195: Local spelling list (optional)
196: .It Pa /usr/local/share/dict/stop
197: Local stop list (optional)
198: .It Pa /usr/libexec/spellprog
199: Binary executed by the shell script
200: .Pa /usr/bin/spell .
201: .El
202: .Sh SEE ALSO
203: .Xr deroff 1 ,
204: .Xr look 1 ,
205: .Xr sed 1 ,
206: .Xr sort 1 ,
207: .Xr tee 1
208: .Sh BUGS
209: The spelling list lacks many technical terms; new installations will
210: probably wish to monitor the output for several months to gather local
211: additions.
212: .Pp
213: British spelling was done by an American.
214: .Pp
215: In
216: .Fl x
217: mode it would be nicer if the stems were grouped with the appropriate word.
218: .Sh HISTORY
219: The
220: .Nm spell
221: command appeared in
222: .At v6 .
223: .Pp
224: Unlike historic versions, the
225: .Ox
226: .Nm
227: command does not use hashed word files.
228: Instead, it uses lexigraphically sorted files and the same technique as
229: .Xr look 1 .