gpt4 book ai didi

python - Pyenchant - 意大利语和西类牙语

转载 作者:太空宇宙 更新时间:2023-11-03 11:26:19 24 4
gpt4 key购买 nike

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

另外,我想为意大利语和西类牙语做这件事。我使用 enchant.list_languages() 查看了 enchant 中可用的词典,我只得到了 ['de_DE', 'en_AU', 'en_GB', 'en_US', 'fr_FR'].

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

谢谢。

最佳答案

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

例如,在 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()

关于python - Pyenchant - 意大利语和西类牙语,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32712557/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com