luozhouyang / python-string-similarity

A library implementing different string similarity and distance measures using Python.
MIT License
991 stars 127 forks source link

Make names of variables reflect what they mean #19

Closed lanzkron closed 4 years ago

lanzkron commented 4 years ago

Rename the variable for s0[i] from s1i to s0i and similarly for s1[j]

This is a very minor change but I think it would reduce confusion while reading/debugging the code (it did for me anyway).

luozhouyang commented 4 years ago

@lanzkron thanks!

lanzkron commented 4 years ago

Thank you!

Can you explain (or point me to an explanation of) the algorithm here? I'm trying to understand the meaning of v0 and v1 and why they are swapped after each char in s0.

I understand the basics of Levenshtein Distance but this algorithm is different.