Pyenchant - 意大利语和西班牙语

时间:2015-09-22 08:53:16

标签: python pyenchant

我在Python中使用 pyenchant 包进行拼写检查。我能够成功地使用英语,法语,德语。

另外,我想用意大利语和西班牙语这样做。我使用enchant.list_languages()调查了附魔中可用的词典,但我只获得了['de_DE', 'en_AU', 'en_GB', 'en_US', 'fr_FR']

我正在寻找如何使用附魔包或任何其他包/技术对意大利语和西班牙语进行拼写检查。

感谢。

2 个答案:

答案 0 :(得分:2)

您可以在Pyenchant中使用任何myspell,aspell,openoffice.org或ispell字典。这将取决于您安装它们的操作系统。

例如,在Ubuntu上,您可以安装任何这些软件包,例如。

    sudo apt-get install myspell-it myspell-es

对于Ubuntu 14.04,这里列出了包:

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

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

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

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

Windows用户会看到http://pythonhosted.org/pyenchant/tutorial.html#windows-users

安装完成后,字典将在您运行时显示:

enchant.list_languages()

答案 1 :(得分:0)

您可以将hunspell用于italian,它将替换它,而myspell用于spanish

sudo apt install hunspell-it 意大利语

sudo apt install myspell-es 西班牙语

相关问题