Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix accents in Russian (ё) #1712

Open
artginzburg opened this issue Dec 21, 2022 · 4 comments
Open

Fix accents in Russian (ё) #1712

artginzburg opened this issue Dec 21, 2022 · 4 comments

Comments

@artginzburg
Copy link

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.

@Jason3S
Copy link
Collaborator

Jason3S commented Dec 21, 2022

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

@artginzburg artginzburg changed the title How to make Russian spell-checking accent-sensitive? Fix accents in Russian (ё) Dec 21, 2022
@artginzburg
Copy link
Author

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.

@Jason3S
Copy link
Collaborator

Jason3S commented Dec 21, 2022

@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.

@artginzburg
Copy link
Author

artginzburg commented Dec 21, 2022

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants