4 ms·
I'm a little surprised not to see any mention of the Levenshtein Distance[0] here. It's the standard way of comparing strings, there are libraries to do it[1],
by ColinWright 7y ago
I'm a little surprised not to see any mention of the Levenshtein Distance[0] here. It's the standard way of comparing strings, there are libraries to do it[1], and it seems to be exactly what's happening here.
There's value in deriving code from scratch to understand the algorithm and the language, but not to mention it at all seems a little odd.
[0] https://en.wikipedia.org/wiki/Levenshtein_distance https://en.wikipedia.org/wiki/Levenshtein_distance
[1] https://duckduckgo.com/?q=Levenshtein+distance+python+library https://duckduckgo.com/?q=Levenshtein+distance+python+librar...