1hunspell(1)                 General Commands Manual                hunspell(1)
2
3
4

NAME

6       hunspell - spell checker, stemmer and morphological analyzer
7

SYNOPSIS

9       hunspell [-1aDGHhLlmnstvw] [--check-url] [-d dict[,dict2,...]] [--help]
10       [-i enc] [-p dict] [-vv] [--version] [file(s)]
11

DESCRIPTION

13       Hunspell is fashioned after the Ispell program.  The most common  usage
14       is "hunspell" or "hunspell filename".  Without filename parameter, hun‐
15       spell checks the standard input.  Typing "cat" and  "exsample"  in  two
16       input  lines, we got an asterisk (it means "cat" is a correct word) and
17       a line with corrections:
18
19              $ hunspell -d en_US
20              Hunspell 1.2.3
21              *
22              & exsample 4 0: example, examples, ex sample, ex-sample
23
24       Correct words signed with an '*', '+' or '-', unrecognized words signed
25       with '#' or '&' in output lines (see later).  (Close the standard input
26       with Ctrl-d on Unix/Linux and Ctrl-Z Enter or Ctrl-C on Windows.)
27
28       With filename parameters, hunspell will display each word of the  files
29       which  does  not  appear in the dictionary at the top of the screen and
30       allow you to change it.  If there are "near misses" in the  dictionary,
31       then  they  are  also  displayed on following lines.  Finally, the line
32       containing the word and the previous line are printed at the bottom  of
33       the  screen.   If  your terminal can display in reverse video, the word
34       itself is highlighted.  You have the option of replacing the word  com‐
35       pletely,  or  choosing  one of the suggested words. Commands are single
36       characters as follows (case is ignored):
37
38              R      Replace the misspelled word completely.
39
40              Space  Accept the word this time only.
41
42              A      Accept the word for the rest of this hunspell session.
43
44              I      Accept the word, capitalized as it is in  the  file,  and
45                     update private dictionary.
46
47              U      Accept  the word, and add an uncapitalized (actually, all
48                     lower-case) version to the private dictionary.
49
50              S      Ask a stem and a model word and store them in the private
51                     dictionary.   The  stem  will  be  accepted also with the
52                     affixes of the model word.
53
54              0-n    Replace with one of the suggested words.
55
56              X      Write the rest of this file, ignoring  misspellings,  and
57                     start next file.
58
59              Q      Exit immediately and leave the file unchanged.
60
61              ^Z     Suspend hunspell.
62
63              ?      Give help screen.
64

OPTIONS

66       -1     Check only first field in lines (delimiter = tabulator).
67
68       -a     The -a option is intended to be used from other programs through
69              a pipe.  In this mode, hunspell prints a one-line version  iden‐
70              tification message, and then begins reading lines of input.  For
71              each input line, a single line is written to the standard output
72              for each word checked for spelling on the line.  If the word was
73              found in the main dictionary, or your personal dictionary,  then
74              the  line  contains  only  a '*'.  If the word was found through
75              affix removal, then the line contains a '+', a  space,  and  the
76              root  word.   If  the  word was found through compound formation
77              (concatenation of two words, then the line contains only a '-'.
78
79              If the word is not in the dictionary, but there are near misses,
80              then  the  line contains an '&', a space, the misspelled word, a
81              space, the number of  near  misses,  the  number  of  characters
82              between  the beginning of the line and the beginning of the mis‐
83              spelled word, a colon, another space, and a  list  of  the  near
84              misses separated by commas and spaces.
85
86              Also,  each  near  miss  or guess is capitalized the same as the
87              input word unless such capitalization is illegal; in the  latter
88              case  each  near  miss is capitalized correctly according to the
89              dictionary.
90
91              Finally, if the word does not  appear  in  the  dictionary,  and
92              there are no near misses, then the line contains a '#', a space,
93              the misspelled word, a space, and the character offset from  the
94              beginning  of  the  line.  Each sentence of text input is termi‐
95              nated with an additional blank line,  indicating  that  hunspell
96              has completed processing the input line.
97
98              These output lines can be summarized as follows:
99
100              OK:    *
101
102              Root:  + <root>
103
104              Compound:
105                     -
106
107              Miss:  & <original> <count> <offset>: <miss>, <miss>, ...
108
109              None:  # <original> <offset>
110
111              For  example,  a  dummy  dictionary containing the words "fray",
112              "Frey",  "fry",  and  "refried"  might  produce  the   following
113              response to the command "echo 'frqy refries | hunspell -a":
114              (#) Hunspell 0.4.1 (beta), 2005-05-26
115              & frqy 3 0: fray, Frey, fry
116              & refries 1 5: refried
117
118              This  mode is also suitable for interactive use when you want to
119              figure out the spelling of  a  single  word  (but  this  is  the
120              default behavior of hunspell without -a, too).
121
122              When  in  the -a mode, hunspell will also accept lines of single
123              words prefixed with any of '*', '&', '@', '+',  '-',  '~',  '#',
124              '!',  '%', '`', or '^'.  A line starting with '*' tells hunspell
125              to insert the word into the user's dictionary (similar to the  I
126              command).   A line starting with '&' tells hunspell to insert an
127              all-lowercase version of the word  into  the  user's  dictionary
128              (similar  to  the  U  command).  A line starting with '@' causes
129              hunspell to accept this word in the future  (similar  to  the  A
130              command).  A line starting with '+', followed immediately by tex
131              or nroff will cause hunspell to parse future input according the
132              syntax  of  that  formatter.   A line consisting solely of a '+'
133              will place hunspell in TeX/LaTeX mode (similar to the -t option)
134              and '-' returns hunspell to nroff/troff mode (but these commands
135              are obsolete).   However,  the  string  character  type  is  not
136              changed; the '~' command must be used to do this.  A line start‐
137              ing with '~' causes hunspell to set internal parameters (in par‐
138              ticular,  the  default string character type) based on the file‐
139              name given in the rest of the line.  (A file  suffix  is  suffi‐
140              cient,  but the period must be included.  Instead of a file name
141              or suffix, a unique name, as listed in the language affix  file,
142              may  be  specified.)   However,  the  formatter  parsing  is not
143              changed;  the '+' command must be used to change the  formatter.
144              A  line  prefixed with '#' will cause the personal dictionary to
145              be saved.  A line prefixed with '!' will turn on terse mode (see
146              below),  and  a  line  prefixed with '%' will return hunspell to
147              normal (non-terse) mode.  A line prefixed with '`' will turn  on
148              verbose-correction  mode (see below); this mode can only be dis‐
149              abled by turning on terse mode with '%'.
150
151              Any input following the prefix characters '+',  '-',  '#',  '!',
152              '%',  or  '`' is ignored, as is any input following the filename
153              on a '~' line.  To allow spell-checking of lines beginning  with
154              these  characters,  a  line starting with '^' has that character
155              removed before it is passed to the spell-checking code.   It  is
156              recommended  that programmatic interfaces prefix every data line
157              with an uparrow to protect themselves against future changes  in
158              hunspell.
159
160              To summarize these:
161
162
163
164              *      Add to personal dictionary
165
166              @      Accept word, but leave out of dictionary
167
168              #      Save current personal dictionary
169
170              ~      Set parameters based on filename
171
172              +      Enter TeX mode
173
174              -      Exit TeX mode
175
176              !      Enter terse mode
177
178              %      Exit terse mode
179
180              `      Enter verbose-correction mode
181
182              ^      Spell-check rest of line
183
184              In terse mode, hunspell will not print lines beginning with '*',
185              '+', or '-', all of which indicate correct words.  This signifi‐
186              cantly  improves running speed when the driving program is going
187              to ignore correct words anyway.
188
189              In verbose-correction mode, hunspell includes the original  word
190              immediately after the indicator character in output lines begin‐
191              ning with '*', '+', and '-', which  simplifies  interaction  for
192              some programs.
193
194
195       --check-url
196              Check URLs, e-mail addresses and directory paths.
197
198
199       -D     Show  detected  path  of  the loaded dictionary, and list of the
200              search path and the available dictionaries.
201
202
203       -d dict,dict2,...
204              Set dictionaries by their base  names  with  or  without  paths.
205              Example of the syntax:
206
207       -d en_US,en_geo,en_med,de_DE,de_med
208
209       en_US and de_DE are base dictionaries, they consist of aff and dic file
210       pairs: en_US.aff, en_US.dic and de_DE.aff, de_DE.dic.  En_geo,  en_med,
211       de_med  are special dictionaries: dictionaries without affix file. Spe‐
212       cial dictionaries are optional extension of the base dictionaries  usu‐
213       ally  with  special (medical, law etc.)  terms. There is no naming con‐
214       vention for special dictionaries, only the ".dic" extension: dictionar‐
215       ies  without affix file will be an extension of the preceding base dic‐
216       tionary (right order of the parameter list needs for good suggestions).
217       First item of -d parameter list must be a base dictionary.
218
219
220       -G     Print only correct words or lines.
221
222
223       -H     The input file is in SGML/HTML format.
224
225
226       -h, --help
227              Short help.
228
229
230       -i enc Set input encoding.
231
232
233       -L     Print lines with misspelled words.
234
235
236       -l     The  "list" option is used to produce a list of misspelled words
237              from the standard input.
238
239
240       -m     Analyze the words of the input text (see also hunspell(4)  about
241              morphological  analysis). Without dictionary morphological data,
242              signs the flags of the affixes of the word forms for  dictionary
243              developers.
244
245
246       -n     The input file is in nroff/troff format.
247
248
249       -P password
250              Set password for encrypted dictionaries.
251
252
253       -p dict
254              Set path of personal dictionary.  The default dictionary depends
255              on the locale settings. The following environment variables  are
256              searched:  LC_ALL,  LC_MESSAGES,  and LANG. If none are set then
257              the default personal dictionary is $HOME/.hunspell_default.
258
259              Setting -d or  the DICTIONARY environmental  variable,  personal
260              dictionary will be $HOME/.hunspell_dicname
261
262
263       -s     Stem  the  words  of  the input text (see also hunspell(4) about
264              stemming). It depends from the dictionary data.
265
266
267       -t     The input file is in TeX or LaTeX format.
268
269
270       -v, --version
271              Print version number.
272
273
274       -vv    Print ispell(1) compatible version number.
275
276
277       -w     Print misspelled words (= lines) from one word/line input.
278
279

EXAMPLES

281       hunspell -d en_US english.html
282
283       hunspell -d en_US,en_US_med medical.txt
284
285       hunspell -d ~/openoffice.org2.4/share/dict/ooo/de_DE
286
287       hunspell *.html
288
289       hunspell -l text.html
290

ENVIRONMENT

292       DICTIONARY
293              Similar to -d.
294
295       DICPATH
296              Dictionary path.
297
298       WORDLIST
299              Equivalent to -p.
300

FILES

302       The default dictionary depends on the locale  settings.  The  following
303       environment  variables  are searched: LC_ALL, LC_MESSAGES, and LANG. If
304       none are set then the following fallbacks are used:
305
306       /usr/share/myspell/default.aff Path of default  affix  file.  See  hun‐
307       spell(4).
308
309       /usr/share/myspell/default.dic  Path  of  default dictionary file.  See
310       hunspell(4).
311
312       $HOME/.hunspell_default.  Default path to personal dictionary.
313

SEE ALSO

315       hunspell (3), hunspell(4)
316

AUTHOR

318       Author of Hunspell executable is László Németh. For  Hunspell  library,
319       see hunspell(3).
320
321       This manual based on Ispell's manual. See ispell(1).
322

BUGS

324       There are some layout problems with long lines.
325
326
327
328                                  2008-06-12                       hunspell(1)
Impressum