wooorm / nspell

đź“ť Hunspell compatible spell-checker
MIT License
267 stars 20 forks source link

spell.correct with human names behavior. #4

Closed s-a closed 7 years ago

s-a commented 7 years ago

While console.log(spell.correct('Stephan')); //=> true and console.log(spell.correct('stephan')); //=> false there might be some name detection in nspell. Does there exists a way to configure nspell that console.log(spell.correct('Stephan')); yields false? I need a way to ignore names.

wooorm commented 7 years ago

Whether names are detected depends on the dictionary you’re using, and how it’s set up. Both en_GB and en_US contain lots of properly cased names (Stephan too), and there’s no way to ignore some part of the dictionary.

You could create a personal dictionary, and forbid a big list of names (*Stephan\n*Stephanie\n...), or, modify the .dic file you pass in?

s-a commented 7 years ago

Unfortunately I try to detect names in a list of words, so it is not possible to declare a blacklist. But thanks for your detailed description.