Webvoyage Spellchecker

Users of Exlibris/Endeavor's voyager ILMS have long requested a system to provide spelling suggestions for mispelt queries in the webvoyage OPAC. Following the lead of Adam Epp (Systems Librarian at Hurst Library), I decided to build an AJAX add-on using opensource tools such as "Aspell" and "perl". Although this webpage focuse on how to use this code to enable spellchecking in webvoyage, it may be useful in a number of other contexts as well.

You can see this script in action on our catalogue http://waikato.lconz.ac.nz

If you are a voyager library, very likely you want to start with, Installing the Spellchecker on an Endevor/Exlibris webvoyage catalogue system

Both spell.cgi and editdict.cgi (currently) use /m1/voyager/shared/aspell/ as their 'home' directory. This is where editdict.cgi will store two files which aspell reads to enable additional words and replacment pairs to be added to the default aspell installation. If you want use a different directory for this, just update the line that reads

$speller->set_option('home-dir', '/m1/voyager/shared/aspell/');
to read correctly in both scripts.

The edit_dict.cgi script should probably not be run on your live production server. It is better that this is run of a more restricted access server as the script doesn't provide any security features. The files you need to copy (into the spell.cgi home directory) are.aspell.en.prepl and .aspell.en.pws edit_dict.cgi needs to have write access to those files and two other files in the same directory called "additionalfiles.txt" and "replacements.txt". The files contain the plain text version of the wrods lists used to generate the .aspell files.

Additional Dictionaries can be created and added to spell.cgi if nessisary. We use this to add support for Maori Language words in our catalogue.

If you find any bugs in the code, or have suggestions for other things this could do. Please feel free to contact me (j.brunskill@waikato.ac.nz).

Downloads:

See: Our blog (Library Cogs) for more details.


This page was written by James Brunskill (www.jambe.co.nz) in March 2007

Note: The code linked to from this page was developed while James was working for the University of Waikato Library. If for any reason the university would like this page and associated scripts to be removed or moved to a different location, I reserve the right to do so.