2

我目前正在尝试改进一些文本数据的拼写,为此我正在使用 pyEnchant 1.6.8(python3.3,Windows 8)。就供应商而言,只有 Myspell 和 Ispell 可用。

我想尝试使用 Aspell,因为我在某处读过它在 store_replacement 方法方面效率更高。Aspell 安装在我正在使用的计算机上,但未显示在提供程序列表中:

b = enchant.Broker()

b.describe()
[<Enchant: Ispell Provider>, <Enchant: Myspell Provider>]

另外,我尝试检查 .dll 所在的目录中的内容([...]\WINPYTHON.3355\python-3.3.5\Lib\site-packages\enchant\lib\enchant),并且有只有libenchant_ispell.dlllibenchant_myspell.dll,那里没有 aspell 文件。

尽管可能很天真,但我尝试在那里复制一个 Aspell .dll 文件,但它没有任何改进。

请问有人有想法吗?

4

1 回答 1

1

我在我的 Mac 上遇到了类似的问题:通过安装 pyenchant(到 Python 3.6 conda 环境)

pip install pyenchant

蟒蛇说

>>> import enchant
>>> b = enchant.Broker()
>>> b.describe()
[<Enchant: Ispell Provider>, <Enchant: Myspell Provider>]

我能够通过使用 pip 卸载此版本的 pyenchant 并将https://github.com/rfk/pyenchant上的 git 存储库克隆到我的主目录中来解决问题(出于我的目的)。运行后

pip install ~/pyenchant/

安装包的本地副本,我看到我现在只有Aspell 提供程序:

>>> import enchant
>>> b = enchant.Broker()
>>> b.describe()
[<Enchant: Aspell Provider>]
于 2017-09-23T12:50:06.980 回答