Pyenchant-意大利语和西班牙语

ann*_*man 5 python pyenchant

我正在使用pyenchant软件包在Python中进行拼写检查。我能够成功使用英语,法语,德语语言进行操作。

另外,我想使用意大利语和西班牙语。我研究了附魔使用中可用的字典enchant.list_languages(),但我只得到了['de_DE', 'en_AU', 'en_GB', 'en_US', 'fr_FR']

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

谢谢。

Dan*_*Dev 4

您可以将任何 myspell、aspell、openoffice.org 或 ispell 字典与 Pyenchant 一起使用。这将取决于您所使用的操作系统以及安装方式。

例如,在 Ubuntu 上,您可以安装这些软件包中的任何一个,例如

    sudo apt-get install myspell-it myspell-es
Run Code Online (Sandbox Code Playgroud)

对于 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()
Run Code Online (Sandbox Code Playgroud)