Previous Topic

Next Topic

Book Contents

Book Index

Packages - Spell-Check Dictionaries

Overview

MOVEit DMZ uses the GNU Aspell program as a back-end for its spell-checking services for packages. This program uses a flexible dictionary mechanism to determine whether words are misspelled or not, and is easily expandable. As an example, MOVEit DMZ comes with two custom-made additional dictionary files, including a 60,000-term medical dictionary, which are configured to be used by the Aspell back-end by default.

Creating custom dictionaries for use by Aspell is relatively easy to do. All that is required is creating a text file containing your word list, compiling that text file into an Aspell dictionary file, and finally telling Aspell to use that dictionary file.

Creating dictionary files and configuring Aspell to use them requires access to the Aspell program and data files, which are stored in the Aspell subdirectory of your MOVEit DMZ non-web directory (by default, D:\MOVEitDMZ) on your server.

Creating a Word List File

A custom dictionary starts with a text file containing a list of words. Each word should be on a separate line and the last line should be left blank. The wordlist file can be named anything and stored anywhere, however it is recommended you follow the examples included, which store the file as a .wordlist file in the bin subdirectory of the Aspell directory (e.g., D:\MOVEitDMZ\Aspell\bin\custom.wordlist). In the case of the examples, the wordlist files are called medical.wordlist and sni.wordlist.

Creating a Dictionary File

Once you have a custom wordlist file, the next step is to create a compiled dictionary file based on that wordlist file. To manually compile a dictionary file from your wordlist file, open a command-prompt and CD to the bin subdirectory of the Aspell directory. Then, execute the following command:

aspell --lang=en create master en-custom.rws < custom.wordlist

...being sure to use the correct name of your wordlist file as the final argument. Again, the dictionary file created by this process can be called anything, but for ease of maintenance, it is recommended you use a format similar to the examples - this means starting the filename with the language of your dictionary (typically en for English), followed by a dash and the name of your wordlist file, and ending with the extension of .rws.

If you plan on periodically making changes to your custom dictionary, it would be best to create a batch file to run the above compilation command. See the build_en-medical.bat and build_en-sni.bat examples.

Configuring Aspell to Use Your Dictionary

Once the dictionary file has been created, the final step is to configure Aspell to use that dictionary file when spell-checking input. Aspell stores its dictionary files in the dict subdirectory of the Aspell directory, so copy your .rws dictionary file there to begin.

To allow Aspell to use multiple dictionaries at once, it utilizes .multi files, which tell Aspell which dictionary files to use for which language. Each .multi file contains a list of commands, one on each line, which tell Aspell how to put together a complete list of words for spellchecking. The most used .multi files are the files en.multi and en_US.multi. Open these two files up in a text editor, and you will see that they are fairly similar (en.multi includes the en_GB-only.rws dictionary, which contains a British-English wordlist). You should also see commands to load the two included example dictionaries, en-medical.rws and en-sni.rws. To load your custom dictionary, add a similar add command with your dictionary file as the argument to both .multi files. Aspell should immediately begin using your custom dictionary when spell-checking input.