PyEnchant without German dictionary
Asked Answered
L

1

6

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.

Liebknecht answered 3/8, 2012 at 23:16 Comment(2)
Did you even look at the documentation?Endocrine
yes, sir, I did. It clearly says de_DE comes with windows installation but for others, I think, this is not straight forward. My effort so far has shown that the underlying Enchant C library takes the dictionaries available for Aspell. I was looking for more clear picture and was hoping SO could help with that.Liebknecht
B
8

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

Bestiality answered 24/8, 2012 at 20:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.