Fuzzy substring matching with Levenshtein distance in Python

Levenshtein distance is a well known technique for fuzzy string matching. With a couple of modifications, it's also possible to use Levenshtein distance to do fuzzy matching of substrings. Let's take a simple example just to show what I mean. needle: "aba" haystack: "c abba c" We can intuitively see that "aba" should match up […]