import enchant
en_us = enchant.Dict('en_US')
en_us_weird_words = ['your', 'weird', 'words', 'list', 'here']
for word in en_us_weird_words:
# add word to personal dictionary
# en_us.add(word)
# add word just for this session
en_us.add_to_session(word)
pt_br = enchant.Dict('pt_BR')
pt_br_weird_words = ['outras', 'palavras', 'estranhas', 'aqui']
for word in pt_br_weird_words:
# add word to personal dictionary
# pt_br.add(word)
# add word just for this session
pt_br.add_to_session(word)
正如我在评论中所说,一个不错的选择是^{}
下面是一个如何使用它为会话添加单词的示例:
我希望有帮助
相关问题 更多 >
编程相关推荐