How to spell-check abbreviations?

430 views Asked by At

I'm using Hunspell which is based on MySpell and I can't work out how to spell-check words with apostrophes in the middle.

I'm testing it on the command line from Max OS X Terminal, as per the following example:

This phrase has single quotes and an apostrophe (all using ASCII 0x27 ')

He doesn't like 'Big Jon'

I am saving this file in test.txt and then running the hunspell program as follows to show spelling errors:

~$ /usr/bin/hunspell -d en-GB -l test.txt
doesn

This prints "doesn" as a failed spelling. All other words pass, including the chopped off "t".

The word doesn't is in my dictionary. (downloaded from Mozilla)

I can force the dictionary to not split the words by adding WORDCHARS ' to the Affix file (en-GB.aff) but then the quoted words are picked up as misspelled, so I get:

~$ /usr/bin/hunspell -d en-GB -l test.txt
'Big
Jon'

Is there a way (without pre-processing the text) to match the valid abbreviations AND decapse quotations?

0

There are 0 answers