【问题标题】:PyEnchant without German dictionary没有德语词典的 PyEnchant
【发布时间】:2012-08-02 00:27:41
【问题描述】:

感谢 Stackoverflow,我了解了 pyenchant 库。

我正在寻找德语词典“de_DE”以通过附魔使用,但找不到。我在哪里可以得到它,我应该把它放在哪个目录以便 pyenchant 可以看到它?

我正在使用运行 Ubuntu 的 linux 机器。

【问题讨论】:

  • 你有没有看过documentation
  • 是的,先生,我做到了。它清楚地表明 de_DE 附带 Windows 安装,但对于其他人,我认为这不是直截了当的。到目前为止,我的努力表明底层 Enchant C 库采用了 Aspell 可用的字典。我正在寻找更清晰的图片,并希望 SO 能对此有所帮助。

标签: python dictionary pyenchant


【解决方案1】:

从终端类型:

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

【讨论】:

    猜你喜欢
    • 2021-12-24
    • 1970-01-01
    • 1970-01-01
    • 2014-02-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多