0

I want to correct a text by using Damereau Levenshtein python (because it also considers transposition). I need to replace all the words of my input text by the words in a dictionary that have a distance of 1. How can I do this ?

Is there another way to correct automatically spelling mistakes ?

Thanks everyone

1 Answers1

0

Well, there exists a ready-made Python package to solve your problem. I think the method distance(string1, string2) should at least solve half your problem.

vsr
  • 1,025
  • 9
  • 17