[Telemetry] Always uploading browser log if enabled instead of wait for crash to...
[chromium-blink-merge.git] / third_party / hunspell / README
blobee34e264ba107d0629660a2acc21e2aa2133ba94
1 About Hunspell
2 --------------
4 Hunspell is a spell checker and morphological analyzer library and program
5 designed for languages with rich morphology and complex word compounding or
6 character encoding. Hunspell interfaces: Ispell-like terminal interface
7 using Curses library, Ispell pipe interface, OpenOffice.org UNO module.
9 Hunspell's code base comes from the OpenOffice.org MySpell
10 (http://lingucomponent.openoffice.org/MySpell-3.zip). See README.MYSPELL,
11 AUTHORS.MYSPELL and license.myspell files.
12 Hunspell is designed to eventually replace Myspell in OpenOffice.org.
14 Main features of Hunspell spell checker and morphological analyzer:
16 - Unicode support (affix rules work only with the first 65535 Unicode characters)
18 - Morphological analysis (in custom item and arrangement style) and stemming
20 - Max. 65535 affix classes and twofold affix stripping (for agglutinative
21   languages, like Azeri, Basque, Estonian, Finnish, Hungarian, Turkish, etc.)
23 - Support complex compoundings (for example, Hungarian and German)
25 - Support language specific features (for example, special casing of
26   Azeri and Turkish dotted i, or German sharp s)
28 - Handle conditional affixes, circumfixes, fogemorphemes,
29   forbidden words, pseudoroots and homonyms.
31 - Free software (LGPL, GPL, MPL tri-license)
33 Compiling on Unix/Linux
34 -----------------------
36 ./configure
37 make
38 make install
40 For dictionary development, use the --with-warnings option of configure.
42 For interactive user interface of Hunspell executable, use the --with-ui option.
44 The developer packages you need to compile Hunspell's interface:
46 glibc-devel
48 optional developer packages:
50 ncurses (need for --with-ui)
51 readline (for fancy input line editing,
52   configure parameter: --with-readline)
53 locale and gettext (but you can also use the
54   --with-included-gettext configure parameter)
56 Hunspell distribution uses new Autoconf (2.59) and Automake (1.9).
58 Compiling on Windows
59 --------------------
61 1. Compiling with Windows SDK
63 Download the free Windows SDK of Microsoft, open a command prompt
64 window and cd into hunspell/src/win_api. Use the following command
65 to compile hunspell:
67 vcbuild
69 2. Compiling in Cygwin environment
71 Download and install Cygwin environment for Windows with the following
72 extra packages: 
74 make
75 gcc-g++ development package
76 mingw development package (for cygwin.dll free native Windows compilation)
77 ncurses, readline (for user interface)
78 iconv (character conversion)
80 2.1. Cygwin1.dll dependent compiling
82 Open a Cygwin shell, cd into the hunspell root directory:
84 ./configure
85 make
86 make install
88 For dictionary development, use the --with-warnings option of configure.
90 For interactive user interface of Hunspell executable, use the --with-ui option.
92 readline configure parameter: --with-readline (for fancy input line editing)
94 1.2. Cygwin1.dll free compiling
96 Open a Cygwin shell, cd into the hunspell/src/win_api and
98 make -f Makefile.cygwin
100 Testing
101 -------
103 Testing Hunspell (see tests in tests/ subdirectory):
105 make check
107 or with Valgrind debugger:
109 make check
110 VALGRIND=[Valgrind_tool] make check
112 For example:
114 make check
115 VALGRIND=memcheck make check
117 Documentation
118 -------------
120 features and dictionary format:
121 man 4 hunspell
123 man hunspell
124 hunspell -h
125 http://hunspell.sourceforge.net
127 Usage
128 -----
130 The src/tools dictionary contains ten executables after compiling
131 (or some of them are in the src/win_api):
133 affixcompress: dictionary generation from large (millions of words) vocabularies
134   analyze: example of spell checking, stemming and morphological analysis
135   chmorph: example of automatic morphological generation and conversion
136   example: example of spell checking and suggestion
137  hunspell: main program for spell checking and others (see manual)
138    hunzip: decompressor of hzip format
139      hzip: compressor of hzip format
140 makealias: alias compression (Hunspell only, not back compatible with MySpell)
141     munch: dictionary generation from vocabularies (it needs an affix file, too).
142   unmunch: list all recognized words of a MySpell dictionary
143 wordforms: word generation (Hunspell version of unmunch)
145 After compiling and installing (see INSTALL) you can
146 run the Hunspell spell checker (compiled with user interface)
147 with a Hunspell or Myspell dictionary:
149 hunspell -d en_US text.txt
151 or without interface:
153 hunspell
154 hunspell -d en_UK -l <text.txt
156 Dictionaries consist of an affix and dictionary file, see tests/
157 or http://wiki.services.openoffice.org/wiki/Dictionaries.
159 Using Hunspell library with GCC
160 -------------------------------
162 Including in your program:
163 #include <hunspell.hxx>
165 Linking with Hunspell static library:
166 g++ -lhunspell example.cxx 
168 Dictionaries
169 ------------
171 Myspell & Hunspell dictionaries:
172 http://wiki.services.openoffice.org/wiki/Dictionaries
174 Aspell dictionaries (need some conversion):
175 ftp://ftp.gnu.org/gnu/aspell/dict
176 Conversion steps: see relevant feature request at http://hunspell.sf.net.
178 László Németh
179 nemeth at OOo