Aspell and Speller Pages

apps

#1

I recently installed the latest version of aspell and Spellerpages so that I could interface spell checking with movable type in entry posting and comment posting. I figured I would post what I did so that others on dreamhost might be able to do the same more easly.

I suppose that if you want, you should be able to copy and paste the two sections of these intructions into sepearte files and then excuite them via a shell script so you don’t have to copy and paste each line individually. Ie. you’d take everyting till the commented lines about setting up your path, into the first file, and everything following the path instructions into a seconed file. Then you’d excute thoes by typing “bash file” Please correct me if I’m wrong about this part.

so here’s what I did:

wget ftp://ftp.gnu.org/gnu/aspell/aspell-0.60.3.tar.gz
wget ftp://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-6.0-0.tar.bz2
tar -xvzf aspell-0.60.3.tar.gz
tar -xvjf aspell6-en-6.0-0.tar.bz2
mkdir usr
cd aspell-0.60.3
./configure --prefix=$HOME/usr
make
make install
make clean
cd …

Need to update the path now

nano .bash_profile

add the following to the end of the file - like the 4th line

PATH="$HOME/usr/bin/:$HOME/usr/share/:$PATH

export PATH

press ctrl and O to write out the file. press enter to keep the same file name

and then press ctrl and X to exit nano.

cd aspell6-en-6.0-0
./configure
make
make install
make clean
cd …

At this point you should be able to run aspell properly from the command line (assuming there were no errors). “aspell -v” should tell you that you have the new version 6 and not 3 that DH has be default.

as far as speller pages goes, you’ll have to download it from:
here
decompress and upload the speller directory into your web-accessible area.

if you don’t have a program installed on your computer that can decompress the tar.gz just download the flie to your computer, and then upload it to your home directory. Then run “tar -xvzf spellerpages-0.5.1.tar.gz” next cd into the new directory you just created. and type “mv speller/ /home/UserName/Domain.com/path/to/some/dir” obviously updating the destination with the correct details…

Now you need to edit the spellchecker.php file in /speller/server-scripts/ directory. On the 8th line it sets the language to use with aspell, but for some reason they think they still need to force utf 8 unicoding on it. change that line to look like:

$aspell_opts = “-a --lang=$lang”;

You can now make sure everything is working by going to www.yourdomain.com/parth/to/speller/ and typing in some incorrectly spelled wrds and run the spel check.

Hopefully I’ll get this posted into the wiki before long, but as of right now I’m still confiused about how to use it. Ah well.

-Matttail


#2

Thanks Mattail!!!

I used your instructions above to install a local version of aspell in my account and then I was able to install Text::Aspell and get the SpellChecker plugin for HTMLArea working. For anyone else, here is how I did it:

First, install aspell as Matttail did above.

The SpellChecker plugin requires the Text::Aspell perl module. You can install this plugin in the SpellChecker directory itself since perl will always search for installed modules locally in the directory where a given .cgi script is run. In this case, when the plugin calls the spell-check-logic.cgi script, it will check the same directory for a folder called Text which contains Aspell.pm. Use these commands:

cd /path/to/htmlarea/plugins/SpellChecker
wget http://search.cpan.org/CPAN/authors/id/H/HA/HANK/Text-Aspell-0.05.tar.gz
tar -xzf Text-Aspell-0.05.tar.gz
cd Text-Aspell-0.05
perl Makefile.PL PREFIX=/path/to/htmlarea/plugins/SpellChecker
CCFLAGS=-I$HOME/usr/include
LIBS="-L$HOME/usr/lib -laspell"
LD_RUN_PATH=$HOME/usr/lib make
make test
make install

need to copy installed module into SpellChecker directory

cp -r lib/perl/5.8.4/* .

Following these steps will put Text/Aspell.pm in your SpellChecker directory and allow the plugin to work correctly.

Cheers,
Morgan