cspell-dicts icon indicating copy to clipboard operation
cspell-dicts copied to clipboard

Fix accents in Russian (ё)

Open artginzburg opened this issue 2 years ago • 4 comments

It's about ё. I'd like to have an error if I spell words like "актёр" or "ёлка" without the accent, e.g. "актер". When I try to set caseSensitive: true in cspell.json — nothing changes at all.

I suppose it is an issue with the Russian dictionary itself, not cSpell, since the accents spell-check fine in Portuguese.

artginzburg avatar Dec 21 '22 07:12 artginzburg

Two things are going on.

To turn on caseSensitive, please add it to languageSettings:

    "languageSettings": [{
        "locale": "ru,ru-ru",
        "caseSensitive": true
    }]

The other issue is that it is in the dictionary: image dictionaries/ru_RU/src/hunspell/index.dic

Jason3S avatar Dec 21 '22 09:12 Jason3S

We can probably use some sort of a list of all Russian words with accents, then find their versions without accents in the dictionary and prefix them with ~ (as I remember, it is used to say that a word is only valid in case-insensitive mode). And add the accented versions of these words as always valid.

Anyway, I don't know anything about the architecture of this repository yet, I'm guessing the .dic file is generated from a smaller file in some smart way. I'm willing to work on that at some point in the future.

artginzburg avatar Dec 21 '22 09:12 artginzburg

@artginzburg,

The dictionary comes from here: dictionary-ru -> code.google.com/hunspell-ru.

Changing this copy won't help much, since it gets auto updated.

I'm open to using a better Hunspell dictionary. Looks like the one from Google is circa 2013.

Jason3S avatar Dec 21 '22 10:12 Jason3S

Opened an issue at dictionary-ru, gonna continue there.

UPD: Gonna continue here, looks like dictionary-ru does not want to participate in this.

artginzburg avatar Dec 21 '22 10:12 artginzburg