1

In particular, I want to download the Greek and German ones. Would that be possible?

If not, then, as far as I understand, I have to build my own dictionaries, by utilizing the corresponding files from the, libreoffice say, project. Am I right?

Dan-Dev
  • 8,957
  • 3
  • 38
  • 55
user706838
  • 5,132
  • 14
  • 54
  • 78
  • Yes you should be able to download some dictionaries without having to make them yourself. Which OS are you using? – Dan-Dev Dec 04 '16 at 12:13

1 Answers1

2

If your using linux e.g. Ubuntu

From the terminal type:

sudo apt-get install myspell-de-de hunspell-el

You can check that you have it available, from a Python prompt type:

import enchant
print enchant.list_languages()

To check it works, from a Python prompt type:

import enchant
d = enchant.Dict('de_DE') # or 'el_GR'
d.check("Hello") # False
d.check("Guten") # True

For a fuller list of dictionaries see:

http://packages.ubuntu.com/xenial/myspell-dictionary

http://packages.ubuntu.com/xenial/aspell-dictionary

http://packages.ubuntu.com/source/xenial/libreoffice-dictionaries

http://packages.ubuntu.com/xenial/ispell-dictionary

Dan-Dev
  • 8,957
  • 3
  • 38
  • 55
  • Thank you very much for your quick answer. Would it be possible to load a dictionary from file? The following does not seem to work for me. Any ideas? ```enchant.request_pwl_dict("/dumps/dictionaries/en_US.dic")``` – user706838 Dec 05 '16 at 15:03
  • No I don't think so. The dictionaries are binaries a PWL is a text file. You also need a dictionary to use a PWL. For instructions on making a dictionary see http://www.suares.com/index.php?page_id=25&news_id=233 but I have not seen any bindings for python to do it. Maybe you could do something similar with python but it would be lots easier just to install the dictionaries with a package manager – Dan-Dev Dec 05 '16 at 16:30
  • Just a thought from http://pythonhosted.org/pyenchant/api/enchant.html " the myspell provider will search any directories given in the “enchant.myspell.dictionary.path” parameter when looking for its dictionary files" is that of any use to you? – Dan-Dev Dec 05 '16 at 16:55