forked from synhershko/hspell
-
Notifications
You must be signed in to change notification settings - Fork 1
/
INSTALL
103 lines (79 loc) · 4.43 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
The README file describes what Hspell is and what it includes. This file
explains how to build and install it.
===========================================================================
Hspell is normally installed and used in one of two ways:
1. Native Hspell: Hspell can be used as a command-line tool "hspell", and/or
using a library libhspell, together with a dictionary in Hspell's own
format.
2. Derivative dictionaries: Hspell's dictionary data is compiled into a
format used by some common multi-lingual spell-checker, such as aspell,
myspell or hunspell.
One benefit of the native Hspell method is much better peformance: When
Hspell's native spell-checker is compared to hunspell, for example, it is
10 times smaller on disk, 10 times faster to start, uses half the memory,
and spell-checks hundreds of times (!) faster. Hspell's code also has
additional features that no multi-lingual spell-checker currently supports,
especially morphological analysis.
The benefit of generating dictionaries for one of the existing multi-lingual
spell-checkers like aspell are obvious: no additional code needs to be
installed (so it will work on any system where aspell works). Even more
importantly: Large applications, such as OpenOffice, Firefox and even
Google's Gmail, which already use aspell et al. to provide spell-checking
for many languages, gain Hebrew spell-checking without any extra effort.
============================================ Native Hspell ===============
Installing Hspell on a Unix-compatible system (Linux, Unix, Mac OS X) is
usually as simple as running
./configure
make
make install
Note that before running "make install", if you want to run the hspell
executable from the build directory, you must tell it to expect the dictionary
files in the current directory, rather than in their final location. Do this
by running "hspell -Dhebrew.wgz". You can also replace the first step
above with "./configure --enable-test" to create an executable that will
always expect by default to find the dictionaries in the current directory.
By default, Hspell is built for installation in the /usr/local tree. If you
want to install it somewhere else, use "./configure --prefix=/some/dir".
The --prefix option is just one of configure's usual options that give
you more control on the way that Hspell is compiled - run "configure -h"
to see the entire list of these options.
In addition to configure's usual options, Hspell's configure add a few
options whose names start with "--enable-", that enable optional features
in Hspell. We already described one of them, --enable-test. The rest are
probably slightly more useful:
--enable-fatverb
Allow "objective kinuyim" on all forms of verbs. Because this adds
as many as 130,000 correct but rarely-used (in modern texts)
inflections, a compile-time option is present for enabling or
disabling these forms. The default in this version is not to enable
them.
--enable-linginfo
Include a full morphological analyzer in "hspell -l", explaining how
each correct word could be derived. This slows down the build and makes
the installation about 4 times larger, but doesn't slow hspell if "-l"
isn't used.
These optional features are not turned on by default because they present
a feature/performance tradeoff (you get more features but slower build,
larger installation, and/or slower executable), or a feature/feature tradeoff
(when you add more rare word forms, you're allowing more spelling mistakes
to masquerade as real-looking).
There are additional options available for "configure": run
configure --help
to get a list of them.
============================================ Derivative Dictionaries =====
After you run "configure" as explained above, the Makefile has additional
targets for creating dictionaries for several common multi-lingual
spell-checkers and applications:
"make aspell" -
Creates the files "he_affix.dat" and "he.wl".
"make myspell" -
Creates the files "he.dic" and "he.aff"
"make hunspell" -
Creates the files "hunspell/new_he.aff" and "hunspell/new_he.dic".
Hunspell can also read the dictionaries from "make myspell", but
"make hunspell" enables a hunspell-only second level of suffix
compression, which creates a smaller dictionary that also uses less
memory and loads faster.
Additionally, we have targets which create plugins useful for applications:
"make ff2" -
Creates the file ff2/spell-he-1.1.xpi for Firefox