Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: third_party/hunspell/README

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

Powered by Google App Engine
This is Rietveld 408576698