A dependency less python library made for finding similar text inspired from similar
import similar
match = similar.best_match("apply", ["pickle", "apple", "orange"])
print(match)
> apple
Also works with
file -
import similar
match = similar.best_match("apply", open("words.txt", "r"))
print(match)
> apple
or generator object
import similar
def genwords():
for word in ["picke", "apple", "orange"]:
yield word
match = similar.best_match("apply", genwords())
print(match)
> apple