Feel so Good - The Spelling Mistakes (1980 - Album Art)
Feel so Good - The Spelling Mistakes (1980 - Album Art)

I am a terrible speller. Every few words I find myself hitting the menu key to correct some word staring at me with its squiggly red line. This proved to be horribly difficult back when I used MacOS, which lacks a menu key and requires the user to find the spell correcting shortcut for each individual application (if one even exists). In the Linux world, I’ll often open a terminal and run aspell -a when the traditional spell check fails me. Aspell is remarkably better at correcting my poor spelling, so why then do most Linux application use the terrible checking provided by Hunspell? Both Aspell and Hunspell are replacements for the much older International Spell or Ispell. When running either using their interactive command line tool, they even proclaim to be Ispell (but really Aspell/Hunsepll) in their output. To illustrate my issues with Hunspell, let’s take some examples of my terrible spelling mistakes.

Take for example the misspelled work excersized.

@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.6.1)
excersized
& excersized 8 0: exercised, excised, excesses, exercises, exorcised, exercise's, exercisers, exerciser's

@(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.3)
excersized
& excersized 1 0: supersized

Aspell provides the correct spelling for my butchered attempt as the first option. Hunspell failed to provide the correct spelling at all.

Another example is the misspelled word enterperuner:

@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.6.1)
enterperuner
& enterperuner 5 0: entrepreneur, Enterprise, enterprise, interpreter, interferon

@(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.3)
enterperuner
& enterperuner 2 0: interpenetrate, serpentine

Once again, Aspell shines as proving the correct word as the very first open. Hunspell fails to provide the correct word at all.

We see the same thing with presuing:

@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.6.1)
presuing
& presuing 11 0: pressing, perusing, presuming, presiding, pressuring, praising, reusing, pursuing, presaging, pressings, pressing's

@(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.3)
presuing
& presuing 6 0: presuming, pressing, pressuring, presupposing, pressurizing, presiding

On the official Aspell website, there are test results showing how Aspell 0.60.6 out performed Hunspell 1.1.121. Although the test data only contained English words, one of Aspell’s big improvements over the Ispell was UTF-8 encoding throughout its code base. This allowed Aspell to suggest corrections for words with international characters such as umlauts in German2. However, Hunspell supports UTF-8 natively as well.

So why is Hunspell used everywhere, even though Aspell seems to have superior correction capabilities? One of the issues is that Aspell is no longer maintained. It’s last release was in 20113, where as Hunspell is actively maintained and used in LibreOffice, Firefox, Thunderbird and Chrome.

So why not make the spelling framework pluggable? After all, many Linux distributions support changing out backend services, such as with Gentoo’s eselect tool or Ubuntu’s etc-alternative system. The trouble is that for many of these applications, Hunspell is actually embedded within the application itself. The Atom editors node-spellchecker embeds its own version of Hunspell, rather than using the system spell checker, as does LibreOffice, Firefox and others.

Embedded spelling libraries also brings up the issue of licensing. Aspell cannot be used in iOS applications, due to Apple not allowing software with LGPL licenses or dependencies in their app store4. When Mozilla was considering using Hunspell instead of the aging Myspell, one of the issues was that Hunspell, licensed only under LGPL, could not be imported into the Mozilla tree5. The Hunspell project later released Hunspell 1.1.3 under a GPL/LGPL/MPL license6, which is another reason for its wide spread adoption.

Interestingly enough, there are still a few e-mails trickling through Aspell’s development mailing list. One of them relates to patching Aspell so that it compiles correctly under Clang, a BSD licensed compiler. However, this patch seems to have been totally ignored78. Without any responses, it’s difficult to tell if this is due to a lack of maintainer, or if it’s due to ideological differences in supporting a BSD licensed compiler.

Aspell was, and still is, a superior spell checker (at least for English dictionaries and my personal use cases). However, it’s also an example at how something that might have better performance, even in the open source world, can still fail to thrive. With Hunspell being, not only the default, but the only spell checker, in so many tools, many people struggle and are unaware that there are better alternatives available. Factors like licensing and maintainership have left this really amazing library in an evolutionary dead end.

  1. Spell Checker Test Kernel Results. Aspell. Retrieved 22 Sep 2016. 

  2. Hunspell vs. aspell. Benko. LYX Mailing List. 2009. Retrieved 22 Sep 2016. 

  3. ChangeLog - GNU Aspell 0.60.7-pre. Retrieved 7 September 2016. Aspell.net. 

  4. Re: [aspell-devel] Need Help. 9 Nov 2011. Da Silva. Aspell Devel Mailing List. 

  5. Bug 319778 - (hunspell) Replace MySpell with HunSpell (comment 1) . Leeuwen. Mozilla Bugzilla. 10 Dec 2005. 

  6. Bug 319778 - (hunspell) Replace MySpell with HunSpell (comment 4). Timar. Mozilla Bugzilla. 11 Dec 2005. 

  7. [aspell-devel] Aspell Clang++ Compilation Patch. 24 February 2016. Hypo Stases. Aspell Devel Mailing List. 

  8. [aspell-devel] Aspell Clang++ Compilation Patch. 8 April 2016. Hypo Stases. Aspell Devel Mailing List.