bartosz-antosik / vscode-spellright

Multilingual, Offline and Lightweight Spellchecker for Visual Studio Code
Other
360 stars 37 forks source link

Suggestions are gibberish on Ubuntu #132

Closed athosmoreno closed 6 years ago

athosmoreno commented 6 years ago

I used to use (?) VS Code with this extension on Windows 10, but made the switch to Ubuntu a while ago. I still use VS Code and this extension to write LaTeX files.

However I noticed that while the app can get the words that are wrong, it does not gave sane suggestions. The suggestions are ofter unrelated to what I wrote or not what I expected (I usually make errors related to accents).

I am using Portuguese (Brazil) as main language. It doesn't happen when I use English (American).

Example:

screenshot example

The expected suggestions were educação and computação.

bartosz-antosik commented 6 years ago

Hello, thanks for reporting.

On Ubuntu unlike Windows Spell Right uses HUNSPELL backend. This may be the problem.

  1. Could you please post these words in text so that I could make some inference?
  2. Is the dictionary taken from the link in my README? Are you sure the dictionary is UTF-8 (how to described in README)?
athosmoreno commented 6 years ago

The Hunspell page says that Firefox and Chrome uses it. Since both of them gave correct suggestions, Hunspell should work fine.

The two files on Dictionary folder are on utf8 encoding, and I took them from the repo on the README. The .aff file is set to utf8 per the instructions.

The words used on the example are educacao, educassao, edicação, computassao, compotação, computacao.

bartosz-antosik commented 6 years ago

Sorry to say, but it looks like some problem with the dictionary. Once you use Portuguese (European) from the same source, it suggests a very different things:

image

I am to far from Portuguese to try to explain this. It may be necessary to search for another dictionary or maybe notify someone who maintains the dictionary.

athosmoreno commented 6 years ago

The screenshot you posted is more close to what I want. I checked and indeed the files on https://github.com/titoBouzout/Dictionaries are old. Some feedback on progress:

I tried using dictonaries from Mozilla (https://addons.mozilla.org/en-US/firefox/addon/corretor/) but the .aff file from them has some difference in syntax and it doesn't work. The ones on LibreOffice (https://extensions.libreoffice.org/extensions/vero-verificador-ortografico-e-hifenizador-em-portugues-do-brasil) aren't on UTF-8. I tried the conversion suggested to UTF-8, but it seems to produce more gibberish corrections or it crashes the accents.

bartosz-antosik commented 6 years ago

If you would maybe eventually find some better dictionary for Brazilian Portuguese, please let me know in this thread. It may be very useful for other people. Thank you.

gusbemacbe commented 6 years ago

Just modify the dictionary file and change the ISO to UTF-8.

athosmoreno commented 6 years ago

I used the files from the @gusbemacbe repo https://github.com/gusbemacbe/LanguagePortuguese and it works. Now I have some sort of dictionary again. Yay

gusbemacbe commented 6 years ago

Yes, I modified all the dictionaries of Brazilian and European Portuguese it to UTF-8 a long time ago, because that Bouzout's repository had errors and I fixed the errors for Sublime Text spellchecking.

Besides, the dictionaries were incomplete and outdated, therefore, I added VERO dictionaries and fixed the errors of Unicode.