hunspell(1)
NAME
hunspell - spell checker, stemmer and morphological analyzer
SYNOPSIS
hunspell [-1aDGHhLlmnstvw] [--check-url] [-d dict[,dict2,...]] [--help] [-i enc] [-p dict] [-vv] [--version] [file(s)]
DESCRIPTION
- Hunspell is fashioned after the Ispell program. The most common usage
is "hunspell" or "hunspell filename". Without filename parameter, hunspell checks the standard input. Typing "cat" and "exsample" in two
input lines, we got an asterisk (it means "cat" is a correct word) and
a line with corrections:
- $ hunspell -d en_US
Hunspell 1.2.3
*
& exsample 4 0: example, examples, ex sample, ex-sample - Correct words signed with an '*', '+' or '-', unrecognized words signed with '#' or '&' in output lines (see later). (Close the standard input with Ctrl-d on Unix/Linux and Ctrl-Z Enter or Ctrl-C on Windows.)
- With filename parameters, hunspell will display each word of the files which does not appear in the dictionary at the top of the screen and allow you to change it. If there are "near misses" in the dictionary, then they are also displayed on following lines. Finally, the line containing the word and the previous line are printed at the bottom of the screen. If your terminal can display in reverse video, the word itself is highlighted. You have the option of replacing the word completely, or choosing one of the suggested words. Commands are single characters as follows (case is ignored):
R Replace the misspelled word completely.- Space Accept the word this time only.
- A Accept the word for the rest of this hunspell session.
- I Accept the word, capitalized as it is in the file, and
update private dictionary.
- U Accept the word, and add an uncapitalized (actually, all
lower-case) version to the private dictionary.
- S Ask a stem and a model word and store them in the private
dictionary. The stem will be accepted also with the affixes of the model word.
- 0-n Replace with one of the suggested words.
- X Write the rest of this file, ignoring misspellings, and
start next file.
- Q Exit immediately and leave the file unchanged.
- ^Z Suspend hunspell.
- ? Give help screen.
OPTIONS
-1 Check only first field in lines (delimiter = tabulator).
- -a The -a option is intended to be used from other programs through
- a pipe. In this mode, hunspell prints a one-line version identification message, and then begins reading lines of input. For each input line, a single line is written to the standard output for each word checked for spelling on the line. If the word was found in the main dictionary, or your personal dictionary, then the line contains only a '*'. If the word was found through affix removal, then the line contains a '+', a space, and the root word. If the word was found through compound formation (concatenation of two words, then the line contains only a '-'.
- If the word is not in the dictionary, but there are near misses, then the line contains an '&', a space, the misspelled word, a space, the number of near misses, the number of characters between the beginning of the line and the beginning of the misspelled word, a colon, another space, and a list of the near misses separated by commas and spaces.
- Also, each near miss or guess is capitalized the same as the input word unless such capitalization is illegal; in the latter case each near miss is capitalized correctly according to the dictionary.
- Finally, if the word does not appear in the dictionary, and there are no near misses, then the line contains a '#', a space, the misspelled word, a space, and the character offset from the beginning of the line. Each sentence of text input is terminated with an additional blank line, indicating that hunspell has completed processing the input line.
- These output lines can be summarized as follows:
- OK: *
- Root: + <root>
- Compound:
EXAMPLES
hunspell -d en_US english.html
hunspell -d en_US,en_US_med medical.txt
hunspell -d ~/openoffice.org2.4/share/dict/ooo/de_DE
hunspell *.html
hunspell -l text.html
ENVIRONMENT
- DICTIONARY
- Similar to -d.
- DICPATH
- Dictionary path.
- WORDLIST
- Equivalent to -p.
FILES
The default dictionary depends on the locale settings. The following
environment variables are searched: LC_ALL, LC_MESSAGES, and LANG. If
none are set then the following fallbacks are used:
/usr/share/myspell/default.aff Path of default affix file. See hunspell(4).
/usr/share/myspell/default.dic Path of default dictionary file. See
hunspell(4).
$HOME/.hunspell_default. Default path to personal dictionary.
SEE ALSO
hunspell (3), hunspell(4)
AUTHOR
Author of Hunspell executable is Lszl Nmeth. For Hunspell library, see
hunspell(3).
This manual based on Ispell's manual. See ispell(1).
BUGS
- There are some layout problems with long lines.