barrust / pyspellchecker

Pure Python Spell Checking http://pyspellchecker.readthedocs.io/en/latest/
MIT License
694 stars 101 forks source link

case sensitive has no significance if language is not None #104

Closed cbsnagur closed 3 years ago

cbsnagur commented 3 years ago

image

issue is mainly bcz in init, case sensitivity is considered only if language is None, else case sensitivity is False.

code line:

  1. self._case_sensitive = case_sensitive if not language else False

I know preloaded dict is has lower case-sensitive words but if i want to add few additionaly words to preloaded dict, which i want to be case-sensitive i cannot achieve that,

issue can be resolved if we updated the check in init,

was there any specific reason why it was done so?

barrust commented 3 years ago

You are correct that one cannot add case-sensitive words to the default language dictionaries. There are several reasons for this but a few of them are:

If you want to add case-sensitive words you can export the dictionary and reload it as case-sensitive. Then you would be able to add to the dictionary.