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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
|
Text::Aspell - Perl interface to the Aspell library
DESCRIPTION
Text::Aspell is an interface to the GNU Aspell library.
GNU Aspell is a Free and Open Source spell checker.
This module is a replacement for the Text::Pspell module to work with
the new GNU Aspell (the replacement for the previous version of Aspell/Pspell).
This module has been built and passed all tests on the following platforms:
perl 5.6.1 on Linux, gcc version 2.95.3 20010315 (release)
perl 5.8.0 on Linux gcc version 2.95.4 20011002 (Debian prerelease)
perl 5.00503 on FreeBSD 4.6-STABLE gcc version 2.95.4 20020320 [FreeBSD]
(these require at least aspell-0.50.1)
perl 5.00503 on Solaris 5.8 sparc SUNW,Ultra-60 gcc version 2.95.2 19991024 (release)
perl 5.00503 on Solaris 2.6, gcc version 2.95.1 19990816 (release)
Please read SUPPORT below if you have trouble building Text::Aspell.
INSTALLATION
Windows users see below.
1) Install Aspell and a Dictionary
Make sure you have a current version of GNU Aspell installed.
You must install both the Aspell program and a dictionary.
They are distributed as separate packages.
Aspell and the dictionary files can be downloaded from:
http://aspell.net/
Note: The Text::Aspell module's test suite ("make test") requires
that the English dictionary is installed.
This module has been tested with the following version of Aspell
and dictionary:
aspell-0.50 Aspell program (ftp://ftp.gnu.org/gnu/aspell/aspell-0.50.tar.gz)
aspell-en-0.50-1 English Dictionary (ftp://ftp.gnu.org/gnu/aspell/aspell-en-0.50-1.tar.bz2)
NOTE: URLs for reference only -- use the most current version of each available.
Aspell and the dictionary packages contain README files that include
installation instructions. Here's a basic overview:
Aspell must be installed first, then install the dictionary file and finally
install the Text::Aspell module.
Aspell installation example:
$ wget ftp://ftp.gnu.org/gnu/aspell/aspell-0.50.tar.gz
$ tar zxof aspell-0.50.tar.gz # or gzip -dc aspell-0.50.tar.gz | tar xof -
$ cd aspell-0.50
$ ./configure ( ./configure --help for options )
$ make
# make install
If you used a --prefix option to install Aspell in a non-standard location you
will need to adjust your path to include $PREFIX/bin. The configure script
for the dictionary needs to find programs installed in the previous step.
Dictionary installation example:
$ wget ftp://ftp.gnu.org/gnu/aspell/aspell-en-0.50-1.tar.bz2
$ tar jxof aspell-en-0.50-1.tar.bz2 # or bunzip2 < aspell-en-0.50-1.tar.bz2 | tar xof -
$ cd aspell-en-0.50-1
$ ./configure
$ make
# make install
At this point you should be able to run Aspell in interactive mode.
For example:
$ aspell -a
@(#) International Ispell Version 3.1.20 (but really Aspell 0.50)
speler
& speler 30 0: speller, speer, spiller, spoiler, ...
2) Build and install this Text::Aspell module.
$ perl Makefile.PL
$ make
$ make test
# make install
If you installed Apsell in a non-standard location (for example, if
you don't have root access) then you will need to tell Makefile.PL where to
find the library.
For example, if Apsell was installed in $HOME/local (--prefix=$HOME/local)
and the perl module should be installed in the perl library $HOME/perl_lib:
$ perl Makefile.PL PREFIX=$HOME/perl_lib \
CCFLAGS=-I$HOME/local/include \
LIBS="-L$HOME/local/lib -laspell"
$ LD_RUN_PATH=$HOME/local/lib make
$ make test
$ make install
WINDOWS USERS
Randy Kobes has provided a PPM and the following instructions for installing
Text::Aspell on Windows. Thanks very much Randy.
For installing on Win32, first get and install the "Full installer"
executable at
http://aspell.net/win32/
this will install Aspell into a location such as C:\Program Files\Aspell. You
will also need to fetch and install at least one of the precompiled
dictionaries found on the same page.
Make sure that the path to the Aspell bin directory (e.g. C:\Program
Files\Aspell\bin\) is in your PATH environment variable. For help with
setting your path see "set environment variables" in the Windows Help
Utility. You may need to reboot or open a new shell window after setting
your path. The Aspell .dll file must be located in the PATH before using
Text::Aspell.
Then, to install Text::Aspell, type at a DOS prompt (all on one line)
C:\> ppm install http://theoryx5.uwinnipeg.ca/ppms/Text-Aspell.ppd
for an ActivePerl 8xx version, or
C:\> ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/Text-Aspell.ppd
for an ActivePerl 6xx version.
If you wish to build Text::Aspell from source:
If you want to build Text::Aspell yourself, you'll need a C compiler, which
must be the same one that your Perl is built with (for ActivePerl, this means
VC++ 6). Assuming you have that, in addition to the "Full installer" binary
package at http://aspell.net/win32/, you'll also need to get and install the
aspell-dev package (also located at http://aspell.net/win32/), which contains
the necessary .lib and .h files needed to compile the Perl module.
Like above, make sure the PATH environment variable points to the location of
the installed Aspell .dll file before building Text::Aspell.
Installation then proceeds as described for the Unix version:
perl Makefile.PL
nmake
nmake test
nmake install
with the additional requirement of passing to 'perl Makefile.PL' the
necessary arguments (e.g. INC and LIBS) to specify the locations of the lib
and header files, if these were installed in a non-standard location. Make
sure that if a non-standard location was used that this is added to your PATH
environment variable before running the tests.
SUPPORT
Before contacting me with problems building Text::Aspell please try and debug
as much as possible.
For example, if "make test" fails, then run in verbose mode:
make test TEST_VERBOSE=1
That may show at what test is failing. It's easy to run the test
script manually -- and you can even edit and add a few print statements to
aid in debugging.
For example:
perl -Iblib/lib -Iblib/arch t/test.t | less
Use of LD_RUN_PATH, CCFLAGS and LIBS as above may also help if the build
process fails.
Remember that you must have the English dictionary installed for tests to
pass (sorry, have to check against some dictionary). Also, you may need to
set your LANG variable to "en_US" so that the English dictionary is selected.
If all else fails, use the request tracker at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-Aspell
|