多亏了Stackoverflow,我了解了pyenchant库。
我正在找德语词典"de_DE“通过enchant使用,但找不到。我可以在哪里得到它,我应该把它放在哪个目录下,这样pyenchant才能看到它?
我使用的是运行Ubuntu的linux机器。
发布于 2012-08-25 04:33:58
在终端类型中:
sudo apt-get install myspell-de-de您可以在Python提示符下输入以下命令,检查是否可以使用它:
import enchant
print enchant.list_languages()要检查它是否正常工作,请在Python提示符下键入:
import enchant
d = enchant.Dict('de_DE')
d.check("Hello") # False
d.check("Guten") # True有关更完整的字典列表,请参阅:
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
https://stackoverflow.com/questions/11804481
复制相似问题