cfinke / Typo.js

A client-side JavaScript spellchecker that uses Hunspell-style dictionaries.
Other
510 stars 111 forks source link

Contractions marked as mispellings #11

Closed dbolton closed 8 years ago

dbolton commented 13 years ago
var dictionary = new Typo("en_US", affData, dicData);
var is_spelled_correctly = dictionary.check("aren't") //should be true, but returns false

All contractions appear to fail, e.g. "I'm", "we're", "didn't", etc.

cfinke commented 13 years ago

Works correctly for me; I've added a testcase to cover contractions in commit 15ba8a0e550fde6dac7b65b81d9687852dd2ebc7.

dbolton commented 13 years ago

Oh, I see now. It does not work when I use a curly apostrophe instead of a straight apostrophe. (I accidentally used a straight apostrophe in the original bug report)

var dictionary = new Typo("en_US", affData, dicData);
var is_spelled_correctly = dictionary.check("aren’t") //should be true, but returns false
cfinke commented 13 years ago

Ok, that makes sense. I'm not sure whether this is a true bug, in that Typo should convert curly quotes to normal quotes when spellchecking, or if it's a substitution that can be specified in the affix file, or if it's not technically a bug. I'll have to do some more reading on Hunspell first.

cfinke commented 8 years ago

After many years of thought, I am going to close this as WONTFIX. Curly quotes are typographical decoration and out of scope of this hobby spellchecker.