Whole document tree
    

Whole document tree

4. Managing Word Lists next up previous contents
Next: 5. Customizing Aspell Up: Aspell .33.7.1 alpha A Previous: 3. Basic Usage   Contents

Subsections


4. Managing Word Lists

4.1 Creating an Individual Word List

To create an individual main word list from a list of words use the command

aspell --lang=«lang» create master ./«base» < «wordlist»
where «base» is the name of the word list and «word list» is the list of words separated by white space. The name of the word list will automatically be converted to all lowercase. The ``./'' is important because without it aspell will create the word list in the normal word list directory. If you are trying to create a word list in a language other than english check the aspell data-dir (usually /usr/share/aspell, use ``aspell dump config'' to find out what it is on your system) to see if a language data file exists for your language. If not you will need to create one. See chapter 7 for more information on using Aspell with other languages.

This will create the file «base» in the current directory. To use the new word list copy the file to the normal word list directory (use ``aspell config'' to find out what it is) and use the option --master=«base».

The compiled dictionary file is machine dependent. It is dependent on endian order, and the page size for the machine because they are mmaped in. Please do not distribute the compiled dictionaries unless you are only distributing them for a particular platform such as you would a binary. That is why is normally installed in ``lib/aspell'' instead of ``share/aspell''.

Aspell is now also able to use special ``multi'' dictionaries. See section 5.4.1 form more information.

A personal and replacement word list can be created in a similar fashion.

Because Aspell does not support any sort of affix compression like Ispell does Ispell word lists will not work as is. In order to use Ispell's word lists simply pipe the word list through ``ispell -e'' to expand the munched word lists.

4.1.1 Format of the Replacement Word List

The replacement word has each replacement pair on its own line in the following format

«misspelled word»: «correction»

4.2 The PWLI file

In order for Aspell to be able to correctly recognize a dictionary based on the setting of the LANG environmental variable and for Pspell to be able to find your word lists each main word list installed should have at least one PWLI file associated with it in the Pspell data directory. This is normally /usr/local/share/pspell/. You can use ``pspell-config pkgdatadir'' to find out what it is on your system.

Each PWLI has the the following name:

«language»[-[«spelling»][-«jargon»]]-«module».pwli
Where «language» is the two letter language code, «spelling» is the particular spelling your interested in if the languages has multiple spelling in different parts of the world such as English, «jargon» is any extra informations to distinguish the word list from other ones with the same language and spelling, and «module» is the pspell module the main word list is for.

For example:

en-aspell.pwli
en-american-aspell.pwli
en-american-medical-ispell.pwli
en-american-xlg-ispell.pwli
de--medical-ispell.pwli
Notice how if the spelling is left out but the jargon is not there needs to be two dashes between the language and the jargon.

Each PWLI file for an Aspell word list should then contain exactly one line which contains the full path of the main word list.

4.3 Dumping the contents of the word list

The dump command will simply dump the contents of a word list to stdout in a format than can be read back in with aspell create.

If no word list is specified the command will act on the default one. For example the command

aspell dump personal
will simply dump the contents of the current personal word list to stdout.


next up previous contents
Next: 5. Customizing Aspell Up: Aspell .33.7.1 alpha A Previous: 3. Basic Usage   Contents
Kevin Atkinson 2001-08-19