Hunspell Turkish dictionary

Hi,

I am trying to add hunspell dic for Turkish spell checking. I found the dic file in github for Turkish but when I add the file to spelling it doesn't work because of the format of the words in dic file. most of the words have some annotations at the end of the word like below.

aceleci/39310,453,47415,47612,43082,4412,24532,32240,57936,52491,38091,42228,10473,18627,49385,3094,32812,3726
acelecili/35296,29603
acelesi/42279

Because of this spell checker can not find the words in dic file. Do I need to do some other configuration for *.dic file before hand? I already installed hunspell plugin but couldn't make the dic file work. Thanks a lot.

 

Mustafa

0

Unfortunately the dictionaries downloaded from the web are not supported, and there is no out-of-box support for Turkish language. Please vote for https://youtrack.jetbrains.com/issue/IDEA-318809/Add-natural-language-support-for-Turkish to get notified of any progress,

0

Hi,

But both in official document and hunspell plugin description says I can add the *.dic files for spellchecking.

Spellchecking | IntelliJ IDEA Documentation (jetbrains.com)

 

0

Hello Mustafa,

Do you mind me asking where exactly did you get that dictionary file, could you please share a link? 

Out of curiosity, I have tried to download and apply one dictionary (the very first from Google search results: https://github.com/titoBouzout/Dictionaries/blob/master/Turkish.dic) and it seems to be working fine despite those annotations:

(these are random words to test, I hope they do not mean anything offensive)

0

Hi Vasiliy,

Don't worry they are not offensive :) I downloaded the same dic file and tried again but my editor still shows typo warning :(

just random words (not offensive :)) for example merhaba = hello. It is in the dic file with /1…… because of that it shows typo warning and try to change it to other word without that extra annotations.

0

Thank you for your reply. Just tried it with the same dictionary:

Have you tried downloading `.aff` file too?
If you have not, please try to download both `.dic` and `.aff` to the same folder and re-add the dictionary again. 

0

I was wondering about what to do with .aff file. I downloaded and add the files in same directory in the project

Then add the dic again but it is still the same for me :(

Also my settings pane stuck at loading after restarting the webstorm :(

 

0

 Also my settings pane stuck at loading after restarting the webstorm :(

This is strange. 
Would it unstuck if you remove both dictionary files?

Meanwhile, I have just tried to play around with this functionality and may confirm that both files are needed (.aff is the Affix file according to Hunspell docs). 

Please try to do the following (this is something that did work for me):
- Copy both files in one directory. It does not really matter if this directory is a part of the project or not;
- Add .dic file to “Settings/Preferences | Editor | Natural Languages | Spelling”. It should show [hunspell-jni], not [wordlist]. What is important is that .aff file should be nearby before you add a dictionary, I have tried to copy it later, it does not work and you might need to remove/add dictionary;
- If “Spelling” window does not open on the aforementioned project, please try my suggestions with a new project to check if they work. We will get back to the hanging settings page afterwards. 

0

Nope it doesn't unstuck :( it happened before but resolved it by itself some time later, but still stuck today.

As for the adding it to another project, it still cannot resolve the words. I did it exactly as you said. both files in same directory, then added the dic file (it shows hunspell-jni) and created new text file to test but no luck.

Am I missing some other setting or some kind of extra configuration?

Hunspell is already installed and enabled by the way.

Also when I add the *.aff file this association window shows. I do not think it is important but I want to mention it may be it is related some how.

0

Nope it doesn't unstuck :( it happened before but resolved it by itself some time later, but still stuck today.

Looks like, IDE is unable to read SpellChecker configuration for some reason. To avoid rebuilding the whole project settings anew you may want to remove the SpellCheckerSettings component  section from `.idea/workspace.xml` file (close the project and make a copy before), here is an example:

<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="1" Folder0="***" CustomDictionaries="1" CustomDictionary0="***" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true"/>

But before changing the file, would it be possible to show contents of SpellCheckerSettings section?

Am I missing some other setting or some kind of extra configuration?

Nothing that I can think of :(
The dictionary configuration is pretty straightforward.

0

Oh, I think I got it, please disregard my previous message.

Is there any chance you are using macOS machine on M1/M2 processor? If this is the case, I am afraid, there is no way to use Hunspell dictionaries :(
Here is a ticket about it:
https://youtrack.jetbrains.com/issue/IDEA-284143/Hunspell-doesnt-work-on-M1-UnsupportedOperationException-Unknown-OS-arch-mac-os-x-aarch64 

I have just checked that on M1 laptop and may confirm that it does not work. Check your IDE logs (Help > Show Logs) for the following snippet:

Caused by: java.lang.UnsupportedOperationException: Unknown OS/arch: mac os x/aarch64
	at dk.dren.hunspell.Hunspell.libNameBare(Hunspell.java:201)

If it is there then you are definitely experiencing IDEA-284143. 

0

Here is my configuration section

<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="1" Folder0="$PROJECT_DIR$/tr-dictionary" CustomDictionaries="1" CustomDictionary0="$PROJECT_DIR$/tr-dictionary/Turkish.dic" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
0

Yup using m2max processor :(

In the issue page I see that the issue is marked obsolete and I need to wait official language support :( is there any info about official Turkish language support?

0

Thank you for the confirmation.
I believe it was marked as “Obsolete” as Hunspell support is going to be deprecated in favor of Grazie bundled plugin. As for the official support, there is no ETA, sorry :(

However, I think I have a workaround for you. You still may use a simple word list, like this one for instance:
https://github.com/mertemin/turkish-word-list/blob/master/words.txt

Just download the file, rename it to .dic and add as a dictionary. 
I have checked it on M1 laptop and it seems to be fine there. Not sure if it this word list is full enough but at least, it is something to start with.

0

请先登录再写评论。