【发布时间】:2018-02-06 09:50:46
【问题描述】:
我不想向 PyEnchant 添加新字典,而是想向字典中添加单个单词,并提供如何更正它们的建议。例如我有代码
import enchant
enchantdict = enchant.Dict("de_GE")
suggested_words = [enchantdict.suggest(word) for word in ['Kunden','Nr','201']]
其中“Nr”是“Nummer”(在英语中是“数字”的意思)的缩写。我想在 PyEnchant 字典中添加这样的内容,当它看到“Nr”时能够建议“Nummer”。我该怎么做?
【问题讨论】:
标签: python dictionary spell-checking pyenchant