cfinke / Typo.js

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

French affixes not read correctly #6

Closed dbolton closed 13 years ago

dbolton commented 13 years ago
var dictionary = new Typo("la", affData, dicData);
var is_spelled_correctly = dictionary.check("marchons") //should be true, but returns false
// (The word "marchons" is a form of the verb "marcher" as explained here: http://www.wordreference.com/fren/marchons )

I used the French dictionary and affix files installed by default with OpenOffice.org (en). You can obtain the files directly from: http://hg.services.openoffice.org/OOO330/file/b70298db35e1/dictionaries/fr_FR

The dictionary line reads: marcher/a0()

cfinke commented 13 years ago

Bug confirmed; root cause is that Typo doesn't yet have support for long-form affix flags. It sees marcher as having four flags: a, 0, (, and ), instead of a0 and ().

cfinke commented 13 years ago

Fixed in commit ad703e59b74e807a725f73eb174a71ce911102fa.