Python enchantment dictionary exists but doesn't work

I am using Python2.7 and am trying to get enchant or aspell to come up with some Danish spelling suggestions. I am using OS X Yosemite

I downloaded brew install aspell --with-lang-da

and it seems to be working because the dictionary seems to exist.

import enchant

print enchant.list_languages() #['da', 'en', 'en_CA', 'en_GB', 'en_US']
print enchant.list_dicts() #[('da', <Enchant: Aspell Provider>), ('en', <Enchant: Aspell Provider>), ('en_CA', <Enchant: Aspell Provider>), ('en_GB', <Enchant: Aspell Provider>), ('en_US', <Enchant: Aspell Provider>)]

d = enchant.request_dict("da")
print(d.suggest("motorcyke"))

d = enchant.Dict("da")
print(d.suggest("motorcyke"))

      

The problem is that no offers appear. It looks like a dictionary, but it's empty.

Thank...

+3


source to share





All Articles