-
Notifications
You must be signed in to change notification settings - Fork 40
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
Multiple dictionaries per file #1069
Comments
The issue with this is that there is no API to spell-check, but basically everything else (selecting lines, highlighting, changing words) is possible. |
The same happens for me when programming or writing translation files where the variables are in English and the strings are in a different language. |
As I write both in English and Portuguese, I combined the English Dictionary with the Portuguese dictionary. So, now I got spell checking on both languages. You may find this dictionary here: |
@evandrocoan I just did this with my Norwegian and English. 322044 lines + 470122. Took me 5 minutes to c+p it with kate on linux. Lol |
Can you please briefly but precisely describe how do you that? Im interested Thanks! |
Steps to merge 2 dictionaries files
Now you got spelling on 2 languages. But there are some downsides:
|
@titoBouzout In linux, I used the cat command with shell redirection (>) into my output file: |
Thanks for the explanation! Ill try :) |
Thank you, @evandrocoan! I'll try to install your EN_PT dictionary here! |
I can not to merge Russian and English dictionaries, I get bad results. See part of answer of hunspell contributor:
Thanks. |
@dimztimz is correct on this:
Therefore as it is to be performed by the Sublime Text spell checking core. So we need to wait for them to implement this feature for the best functionality. Now I got good results with some disadvantages merging the EN _ PT dictionaries. However these two languages are pretty similar. For English and Russian, should not be easy to merge them, if it is possible. |
More programs use Hunspell as Sublime Text. Can try to find extension for another program. I try use in Sublime Text Firefox Russian-English Bilingual addon, and it successfully worked for me. But for single language spellchecking package LanguageTool — the best solution with many nice features. Thanks. |
And I thought I had it with {
"dictionary":
[
"Packages/Language - English/en_US.dic",
"Packages/Language - Other/Portuguese (European).dic"
]
} Alas, no. |
Fixed in build 4123. |
This doesn't work very reliably, please see a quick check of different dictionary combos taken from here below and note how the This is my complete settings file in a new portable Sublime on Windows, scroll horizontally to see the results for different dictionary combos
|
And by "working fine" you mean that it's not highlighting any spelling mistakes in the Russian line? All the example lines contain spelling errors, so no line should ever be free from red no matter the dictionary/ies |
I think it's due to the first wrong line in the dictionary affix file Out of curiosity, are you combining the language files behind the scenes (having to deal with different affix schemes) or are you using a simpler API and send each text to each dic and then combine the results it somehow? |
Ah yes, the en_US dictionary seems to be wrongly configured. It's unrelated to this issue, but I'll put in a fix.
There's no way to combine the languages (easily), so we just check if a sub-word is spelt correctly according to any of the listed dictionaries. |
Upon further inspection we just seem to be handling the encoding wrong. |
você ainda tem esse Dicionário ? |
Movi para este link: https://github.com/evandrocoan/LanguageEnglishAndPortuguese |
Is this consider to be solved? Because I still have problems with it. I have also tried with a UTF8 |
@stdedos the encoding problem was fixed in build 4125, so yes this should all be working. |
I am using https://github.com/titoBouzout/Dictionaries/blob/master/Greek.dic with "dictionary": [
"Packages/Language - English/en_US.dic", // 1
"Packages/Language - English/en_GB.dic", // 2
"Packages/Greek.dic", // 3
"Packages/Greek_UTF8.dic", // 3
"Packages/User/Greek.dic", // 3
], and text
half lights up like a Christmas tree. |
Can you tell me what is wrong with the Ukrainian dictionary? When I add to the {
"dictionary": [
"Packages/Language - English/en_US.dic",
"Packages/User/Dictionaries/uk_UA.dic",
],
} Thanks! Sublime Text v4134 |
@ihor-oleks I suggest making a separate issue, thanks. |
Done, thanks. |
I use Sublime Text to write fiction in which the same text file may contain several languages, especially in lines spoken by characters of different nationalities, for example Norwegian, English and Japanese.
When using spell checking, it seems I must settle on a single language, which means text in other languages will be marked as "incorrectly spelled" and marked in red. Annoying and confusing.
What would be the best way to overcome this? Can support be added for multiple dictionaries per file, for example?
If it makes a difference, I do most of this writing in the Fountainhead package, if that makes it easier to come up with a solution (such as handling spoken lines in a particular way.)
The text was updated successfully, but these errors were encountered: