hunspell-en/tests/test_suggest_words-en_US.py

10 lines
214 B
Python
Raw Permalink Normal View History

2024-11-07 13:05:15 +00:00
#!/usr/bin/python3
import enchant
wdlst = [ "hello", "tea", "morning"]
dic = enchant.Dict("en_US")
for wd in wdlst:
dic.check(wd)
print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd)))