Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyEnchant without German dictionary

Thanks to Stackoverflow, I learnt about pyenchant library.

I am looking for German dictionary "de_DE" to use through enchant, but could not find one. Where can I get it and which directory should I put it so that pyenchant can see it?

I am using a linux box running Ubuntu.

like image 665
Jey Avatar asked Aug 03 '12 23:08

Jey


1 Answers

From the terminal type:

sudo apt-get install myspell-de-de

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')
d.check("Hello") # False
d.check("Guten") # True

For a fuller list of dictionaries see:

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

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

http://packages.ubuntu.com/source/precise/openoffice.org-dictionaries

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

like image 85
Dan-Dev Avatar answered Oct 21 '22 03:10

Dan-Dev