Aspell and Curly Quotes

Published: January 13, 2017

Tags:

aspell really doesn’t like curly quotes…

$ echo "This really shouldn’t fail" | aspell list
shouldn
$
$ echo "This really shouldn't fail" | aspell list
$

I ran up against this issue looking into adding a spell check featured for jekyll-pre-commit.

There are a few threads you’ll find on this issue, but most of them don’t seem to indicate any resolution…


Tue, 19 Feb 2008 10:22:17 -0800

I use aspell from within Emacs. I have some documents that are stored in utf-8 and use the unicode code points for curly quotes (8220, 8221, 8216, and 8217) rather than ASCII straight quotes. Is there any way to get aspell to recognize a curly apostrophe as a word constituent so contractions (e.g. isn’t, except where the ‘ is Unicode character 8217) are recognized as single words, correctly spelled words. At the moment it sees “isn” and complains about it.

-Peter

https://lists.gnu.org/archive/html/aspell-user/2008-02/msg00009.html

Tue, 22 Jul 2008 19:47:34 +1200

Did anyone find a solution to this problem?

Jeremy

https://lists.gnu.org/archive/html/aspell-user/2008-07/msg00018.html

Tue, 22 Jul 2008 22:33:05 -0300

At first, I thought about adding it the special characters which can be considered part of the word, but I just tried it, and it doesn’t work. Maybe because Aspell is 8 bit only, and AFAIK the curly apostrophe is outside iso-8859-1.

I guess the only proper way of doing this is making Aspell understand both kinds of apostrophes as “synonyms”, which AFAIK would require you to file a feature request.

Leonardo Fontenelle

https://lists.gnu.org/archive/html/aspell-user/2008-07/msg00020.html


Some people even seem to be looking to turn off curly quotes entirely for this reason…

How do I turn off smart quotes and apostrophes in Jekyll? It is breaking my gulp spellcheck process.

http://stackoverflow.com/questions/25596792/how-do-i-turn-off-smart-quotes-in-jekyll


I spent some time researching this issue myself, and from what I can see this best option at this point seems to be to replace the curly quotes with straight quotes (via sed) before sending to aspell as outlined here. Per the below, aspell is OK with things if you do that…

$ echo "This really shouldn’t fail" | sed "s/’/'/g" | aspell list
$

Per the stack overflow answer updating your dictionary is another option.

Max Chadwick Hi, I'm Max!

I'm a software developer who mainly works in PHP, but loves dabbling in other languages like Go and Ruby. Technical topics that interest me are monitoring, security and performance. I'm also a stickler for good documentation and clear technical writing.

During the day I lead a team of developers and solve challenging technical problems at Rightpoint where I mainly work with the Magento platform. I've also spoken at a number of events.

In my spare time I blog about tech, work on open source and participate in bug bounty programs.

If you'd like to get in contact, you can find me on Twitter and LinkedIn.