I'm trying to use pyenchant to spell-check English and Bulgarian text. I have an issue where in English, words are recognized both when they are lower case and when they start with an upper case letter. For example:
>>> d = Dict('en_GB')
>>> d.check('car')
True
>>> d.check('Car')
True
However, in Bulgarian:
>>> d = Dict('bg_BG')
>>> d.check('кола')
True
>>> d.check('Кола')
False
Is this normal behavior? I want to use the SpellChecker class to check whole paragraphs and this is getting in the way. I don't really want to use .lower()
on the whole str, as this seems like a hack.
I'm using pyenchant==1.6.8
and Python 3.5.2. The en_US and en_GB dictionaries came with pyenchant and I downloaded the bg_BG dictionary from https://cgit.freedesktop.org/libreoffice/dictionaries/plain/bg_BG/bg_BG.dic
and aff respectively. I had to convert them from Windows-1251 to UTF-8, because otherwise no words were being recognized.