Editing Additional Words dictionary and Replacement Pairs

To add words to the additionalwords dictionary you can use the editdict.cgi script. This allows users to add words to the words list (additionalwords.txt) and recreate the spellchecker's dictionary using these extra words.

The script can also be used to store replacement pairs or prefered suggestions for missspelt words. These pairs of words are stored in replacements.txt then added to aspells replacment dictionary. (Use the Rebuild button).

As this script does provide a login mechanism or other security features, I recommend you run it on a restricted access server. You can then copy files you need to you production server. The files you need to copy 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.

You are welcome to make improvements to this script (and the others on these pages) if you do make any improvements please let me know as they might be useful for us as well.

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).

Back to the spellchecker page


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.