| OLD | NEW |
| (Empty) |
| 1 About Hunspell | |
| 2 -------------- | |
| 3 | |
| 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. | |
| 8 | |
| 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. | |
| 13 | |
| 14 Main features of Hunspell spell checker and morphological analyzer: | |
| 15 | |
| 16 - Unicode support (affix rules work only with the first 65535 Unicode characters
) | |
| 17 | |
| 18 - Morphological analysis (in custom item and arrangement style) and stemming | |
| 19 | |
| 20 - Max. 65535 affix classes and twofold affix stripping (for agglutinative | |
| 21 languages, like Azeri, Basque, Estonian, Finnish, Hungarian, Turkish, etc.) | |
| 22 | |
| 23 - Support complex compoundings (for example, Hungarian and German) | |
| 24 | |
| 25 - Support language specific features (for example, special casing of | |
| 26 Azeri and Turkish dotted i, or German sharp s) | |
| 27 | |
| 28 - Handle conditional affixes, circumfixes, fogemorphemes, | |
| 29 forbidden words, pseudoroots and homonyms. | |
| 30 | |
| 31 - Free software (LGPL, GPL, MPL tri-license) | |
| 32 | |
| 33 Compiling on Unix/Linux | |
| 34 ----------------------- | |
| 35 | |
| 36 ./configure | |
| 37 make | |
| 38 make install | |
| 39 | |
| 40 For dictionary development, use the --with-warnings option of configure. | |
| 41 | |
| 42 For interactive user interface of Hunspell executable, use the --with-ui option. | |
| 43 | |
| 44 The developer packages you need to compile Hunspell's interface: | |
| 45 | |
| 46 glibc-devel | |
| 47 | |
| 48 optional developer packages: | |
| 49 | |
| 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) | |
| 55 | |
| 56 Hunspell distribution uses new Autoconf (2.59) and Automake (1.9). | |
| 57 | |
| 58 Compiling on Windows | |
| 59 -------------------- | |
| 60 | |
| 61 1. Compiling with Windows SDK | |
| 62 | |
| 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: | |
| 66 | |
| 67 vcbuild | |
| 68 | |
| 69 2. Compiling in Cygwin environment | |
| 70 | |
| 71 Download and install Cygwin environment for Windows with the following | |
| 72 extra packages: | |
| 73 | |
| 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) | |
| 79 | |
| 80 2.1. Cygwin1.dll dependent compiling | |
| 81 | |
| 82 Open a Cygwin shell, cd into the hunspell root directory: | |
| 83 | |
| 84 ./configure | |
| 85 make | |
| 86 make install | |
| 87 | |
| 88 For dictionary development, use the --with-warnings option of configure. | |
| 89 | |
| 90 For interactive user interface of Hunspell executable, use the --with-ui option. | |
| 91 | |
| 92 readline configure parameter: --with-readline (for fancy input line editing) | |
| 93 | |
| 94 1.2. Cygwin1.dll free compiling | |
| 95 | |
| 96 Open a Cygwin shell, cd into the hunspell/src/win_api and | |
| 97 | |
| 98 make -f Makefile.cygwin | |
| 99 | |
| 100 Testing | |
| 101 ------- | |
| 102 | |
| 103 Testing Hunspell (see tests in tests/ subdirectory): | |
| 104 | |
| 105 make check | |
| 106 | |
| 107 or with Valgrind debugger: | |
| 108 | |
| 109 make check | |
| 110 VALGRIND=[Valgrind_tool] make check | |
| 111 | |
| 112 For example: | |
| 113 | |
| 114 make check | |
| 115 VALGRIND=memcheck make check | |
| 116 | |
| 117 Documentation | |
| 118 ------------- | |
| 119 | |
| 120 features and dictionary format: | |
| 121 man 4 hunspell | |
| 122 | |
| 123 man hunspell | |
| 124 hunspell -h | |
| 125 http://hunspell.sourceforge.net | |
| 126 | |
| 127 Usage | |
| 128 ----- | |
| 129 | |
| 130 The src/tools dictionary contains ten executables after compiling | |
| 131 (or some of them are in the src/win_api): | |
| 132 | |
| 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) | |
| 144 | |
| 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: | |
| 148 | |
| 149 hunspell -d en_US text.txt | |
| 150 | |
| 151 or without interface: | |
| 152 | |
| 153 hunspell | |
| 154 hunspell -d en_UK -l <text.txt | |
| 155 | |
| 156 Dictionaries consist of an affix and dictionary file, see tests/ | |
| 157 or http://wiki.services.openoffice.org/wiki/Dictionaries. | |
| 158 | |
| 159 Using Hunspell library with GCC | |
| 160 ------------------------------- | |
| 161 | |
| 162 Including in your program: | |
| 163 #include <hunspell.hxx> | |
| 164 | |
| 165 Linking with Hunspell static library: | |
| 166 g++ -lhunspell example.cxx | |
| 167 | |
| 168 Dictionaries | |
| 169 ------------ | |
| 170 | |
| 171 Myspell & Hunspell dictionaries: | |
| 172 http://wiki.services.openoffice.org/wiki/Dictionaries | |
| 173 | |
| 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. | |
| 177 | |
| 178 László Németh | |
| 179 nemeth at OOo | |
| OLD | NEW |