Make Aspell actually work

Aspell is a command-line spellchecker, useful for Nano and Mutt for example. The only problem is get it actually to work.

System Locale versus Spelling Dictionary

Aspell works out of the box if your system locale is English and you want to spell check only the same language. This is not mostly the case. My system locale is different, but I want to spell check English.

Command-Line Options versus Configuration File

Aspell’s behaviour can be modified by adding command line options, but this is useless, because normally Aspell is invoked from another program, such as Nano or Mutt. Aspell’s behaviour can be modified also by tweaking a config file, which would be useful, if the instructions on how to do it were not utterly confusing.

The config files mentioned on man aspell are not in the indicated locations, not in my system at least. The way to get access to the content of configuration options is to do

aspell dump config > .aspell.conf

This creates the file .aspell.conf whose settings Aspell will follow, when set correctly. Initially the content is entirely commented out and this is a good thing, because nothing in there is usable. You can try uncommenting some lines, but you will see that these are not workable settings when you invoke Aspell.

Setting a Spellcheck Dictionary

If your system locale is other than the spellcheck language that you need (which is the case for pretty much everybody outside the English-speaking world), you will need to first install an English dictionary in addition to Aspell itself. The name of the package to install may be aspell-en or aspell-uk. Both are English, but the latter is British.

After the necessary dictionaries have been installed, open the .aspell.conf file. Add the lines,

  lang en  master en 

This makes Aspell workable for a start. Other settings may be useful too, but they are beyond my scope.

2 Replies to “Make Aspell actually work”

  1. “The only problem is get it actually to work.”

    Exactly. I use English and I am in the USA. Let’s try a legitimate word that aspell doesn’t know and try to add it to the dictionary.

    $ aspell -a
    @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7-20110707)
    manticore
    & manticore 8 0: manicure, mantra, mediocre, monitory, minatory, Medicare, medicare, mandatory
    a
    * # testword
    aspell -a < testword
    @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7-20110707)
    & manticore 8 0: manicure, mantra, mediocre, monitory, minatory, Medicare, medicare, mandatory

    There is no way to add the word interactively here.

  2. Comment was mangled somehow. After “a” and the program responds with a “*”, I commented that this is supposed to mean that the word is added to the dictionary. But it isn’t.

Leave a Reply

Your email address will not be published. Required fields are marked *