]> git.lyx.org Git - lyx.git/blob - 3rdparty/hunspell/1.6.2/README.md
Append rows and columns if necessary when pasting into table
[lyx.git] / 3rdparty / hunspell / 1.6.2 / README.md
1 About Hunspell
2 ==============
3
4 NOTICE: Version 2 is in the works. For contributing see
5 [version 2 specification][v2spec] and the folder `src/hunspell2`.
6
7 [v2spec]: https://github.com/hunspell/hunspell/wiki/Version-2-Specification
8
9 Hunspell is a spell checker and morphological analyzer library and program
10 designed for languages with rich morphology and complex word compounding or
11 character encoding. Hunspell interfaces: Ispell-like terminal interface
12 using Curses library, Ispell pipe interface, C++ class and C functions.
13
14 Hunspell's code base comes from the OpenOffice.org MySpell
15 (http://lingucomponent.openoffice.org/MySpell-3.zip). See README.MYSPELL,
16 AUTHORS.MYSPELL and license.myspell files.
17 Hunspell is designed to eventually replace Myspell in OpenOffice.org.
18
19 Main features of Hunspell spell checker and morphological analyzer:
20
21 - Unicode support (affix rules work only with the first 65535 Unicode
22   characters)
23 - Morphological analysis (in custom item and arrangement style) and stemming
24 - Max. 65535 affix classes and twofold affix stripping (for agglutinative
25   languages, like Azeri, Basque, Estonian, Finnish, Hungarian, Turkish, etc.)
26 - Support complex compoundings (for example, Hungarian and German)
27 - Support language specific features (for example, special casing of
28   Azeri and Turkish dotted i, or German sharp s)
29 - Handle conditional affixes, circumfixes, fogemorphemes,
30   forbidden words, pseudoroots and homonyms.
31 - Free software. Versions 1.x are licenced under LGPL, GPL, MPL tri-license.
32   Version 2 is licenced only under GNU LGPL.
33
34 Compiling on GNU/Linux and Unixes
35 =================================
36
37         autoreconf -vfi
38         ./configure
39         make
40         sudo make install
41         sudo ldconfig
42
43 For dictionary development, use the `--with-warnings` option of configure.
44
45 For interactive user interface of Hunspell executable, use the `--with-ui option`.
46
47 The developer packages you need to compile Hunspell's interface:
48
49         autoconf automake autopoint libtool g++
50
51 Optional developer packages:
52
53 - ncurses (need for --with-ui), eg. libncursesw5 for UTF-8
54 - readline (for fancy input line editing,
55   configure parameter: --with-readline)
56 - locale and gettext (but you can also use the
57   --with-included-gettext configure parameter)
58
59 Compiling on Windows
60 ====================
61
62 ## 1. Compiling with Mingw64 and MSYS2
63
64 Download Msys2, update everything and install the following packages:
65
66         pacman -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool
67
68 Open Mingw-w64 Win64 prompt and compile the same way as on Linux, see above.
69
70 ## 2. Compiling in Cygwin environment
71
72 Download and install Cygwin environment for Windows with the following
73 extra packages: 
74
75 - make
76 - automake
77 - autoconf
78 - libtool
79 - gcc-g++ development package
80 - ncurses, readline (for user interface)
81 - iconv (character conversion)
82
83 Then compile the same way as on Linux. Cygwin builds depend on Cygwin1.dll.
84
85 Debugging
86 =========
87
88 For debugging we need to create a debug build and then we need to start `gdb`.
89
90         make clean
91         make CXXFLAGS='-g -O0'
92         libtool --mode=execute gdb src/tools/hunspell
93
94 Testing
95 =======
96
97 Testing Hunspell (see tests in tests/ subdirectory):
98
99         make check
100
101 or with Valgrind debugger:
102
103         make check
104         VALGRIND=[Valgrind_tool] make check
105
106 For example:
107
108         make check
109         VALGRIND=memcheck make check
110
111 Documentation
112 =============
113
114 features and dictionary format:
115
116         man 5 hunspell
117         man hunspell
118         hunspell -h
119         
120 http://hunspell.github.io/
121
122 Usage
123 =====
124
125 The src/tools directory contains ten executables after compiling:
126
127 - affixcompress: dictionary generation from large (millions of words)
128   vocabularies
129 - analyze: example of spell checking, stemming and morphological analysis
130 - chmorph: example of automatic morphological generation and conversion
131 - example: example of spell checking and suggestion
132 - hunspell: main program for spell checking and others (see manual)
133 - hunzip: decompressor of hzip format
134 - hzip: compressor of hzip format
135 - makealias: alias compression (Hunspell only, not back compatible with MySpell)
136 - munch: dictionary generation from vocabularies (it needs an affix file, too).
137 - unmunch: list all recognized words of a MySpell dictionary
138 - wordforms: word generation (Hunspell version of unmunch)
139
140 After compiling and installing (see INSTALL) you can
141 run the Hunspell spell checker (compiled with user interface)
142 with a Hunspell or Myspell dictionary:
143
144         hunspell -d en_US text.txt
145
146 or without interface:
147
148         hunspell
149         hunspell -d en_UK -l <text.txt
150
151 Dictionaries consist of an affix and dictionary file, see tests/
152 or http://wiki.services.openoffice.org/wiki/Dictionaries.
153
154 Using Hunspell library with GCC
155 ===============================
156
157 Including in your program:
158
159         #include <hunspell.hxx>
160
161 Linking with Hunspell static library:
162
163         g++ -lhunspell example.cxx 
164
165 Dictionaries
166 ------------
167
168 Myspell & Hunspell dictionaries:
169
170 - http://extensions.libreoffice.org
171 - http://cgit.freedesktop.org/libreoffice/dictionaries
172 - http://extensions.openoffice.org
173 - http://wiki.services.openoffice.org/wiki/Dictionaries
174
175 Aspell dictionaries (need some conversion):
176
177 - ftp://ftp.gnu.org/gnu/aspell/dict
178
179 Conversion steps: see relevant feature request at http://hunspell.github.io/ .
180
181 László Németh
182 nemeth at numbertext org