What is a simple fuzzy string matching algorithm in Python?

前端 未结 7 897
不知归路
不知归路 2020-12-13 00:55

I\'m trying to find some sort of a good, fuzzy string matching algorithm. Direct matching doesn\'t work for me — this isn\'t too good because unless my strings are a 100% si

7条回答
  •  天命终不由人
    2020-12-13 01:35

    You could modify the Levenshtein algorithm to compare words rather than characters. It's not a very complex algorithm and the source is available in many languages online.

    Levenshtein works by comparing two arrays of chars. There is no reason that the same logic could not be applied against two arrays of strings.

提交回复
热议问题