1About Hunspell 2-------------- 3 4Hunspell is a spell checker and morphological analyzer library and program 5designed for languages with rich morphology and complex word compounding or 6character encoding. Hunspell interfaces: Ispell-like terminal interface 7using Curses library, Ispell pipe interface, OpenOffice.org UNO module. 8 9Hunspell's code base comes from the OpenOffice.org MySpell 10(http://lingucomponent.openoffice.org/MySpell-3.zip). See README.MYSPELL, 11AUTHORS.MYSPELL and license.myspell files. 12Hunspell is designed to eventually replace Myspell in OpenOffice.org. 13 14Main 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 33Compiling on Unix/Linux 34----------------------- 35 36./configure 37make 38make install 39 40For dictionary development, use the --with-warnings option of configure. 41 42For interactive user interface of Hunspell executable, use the --with-ui option. 43 44The developer packages you need to compile Hunspell's interface: 45 46glibc-devel 47 48optional developer packages: 49 50ncurses (need for --with-ui), eg. libncursesw5 for UTF-8 51readline (for fancy input line editing, 52 configure parameter: --with-readline) 53locale and gettext (but you can also use the 54 --with-included-gettext configure parameter) 55 56Hunspell distribution uses new Autoconf (2.59) and Automake (1.9). 57 58Compiling on Windows 59-------------------- 60 611. Compiling with Windows SDK 62 63Download the free Windows SDK of Microsoft, open a command prompt 64window and cd into hunspell/src/win_api. Use the following command 65to compile hunspell: 66 67vcbuild 68 692. Compiling in Cygwin environment 70 71Download and install Cygwin environment for Windows with the following 72extra packages: 73 74make 75gcc-g++ development package 76mingw development package (for cygwin.dll free native Windows compilation) 77ncurses, readline (for user interface) 78iconv (character conversion) 79 802.1. Cygwin1.dll dependent compiling 81 82Open a Cygwin shell, cd into the hunspell root directory: 83 84./configure 85make 86make install 87 88For dictionary development, use the --with-warnings option of configure. 89 90For interactive user interface of Hunspell executable, use the --with-ui option. 91 92readline configure parameter: --with-readline (for fancy input line editing) 93 941.2. Cygwin1.dll free compiling 95 96Open a Cygwin shell, cd into the hunspell/src/win_api and 97 98make -f Makefile.cygwin 99 100Testing 101------- 102 103Testing Hunspell (see tests in tests/ subdirectory): 104 105make check 106 107or with Valgrind debugger: 108 109make check 110VALGRIND=[Valgrind_tool] make check 111 112For example: 113 114make check 115VALGRIND=memcheck make check 116 117Documentation 118------------- 119 120features and dictionary format: 121man 5 hunspell 122 123man hunspell 124hunspell -h 125http://hunspell.sourceforge.net 126 127Usage 128----- 129 130The src/tools dictionary contains ten executables after compiling 131(or some of them are in the src/win_api): 132 133affixcompress: 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 140makealias: 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 143wordforms: word generation (Hunspell version of unmunch) 144 145After compiling and installing (see INSTALL) you can 146run the Hunspell spell checker (compiled with user interface) 147with a Hunspell or Myspell dictionary: 148 149hunspell -d en_US text.txt 150 151or without interface: 152 153hunspell 154hunspell -d en_UK -l <text.txt 155 156Dictionaries consist of an affix and dictionary file, see tests/ 157or http://wiki.services.openoffice.org/wiki/Dictionaries. 158 159Using Hunspell library with GCC 160------------------------------- 161 162Including in your program: 163#include <hunspell.hxx> 164 165Linking with Hunspell static library: 166g++ -lhunspell example.cxx 167 168Dictionaries 169------------ 170 171Myspell & Hunspell dictionaries: 172http://extensions.libreoffice.org 173http://cgit.freedesktop.org/libreoffice/dictionaries 174http://extensions.openoffice.org 175http://wiki.services.openoffice.org/wiki/Dictionaries 176 177Aspell dictionaries (need some conversion): 178ftp://ftp.gnu.org/gnu/aspell/dict 179Conversion steps: see relevant feature request at http://hunspell.sf.net. 180 181László Németh 182nemeth at numbertext org 183