Closed poperigby closed 3 months ago
I fixed the second problem but this will no longer work with non-ASCII characters. Not an issue in my opinion.
@AbyssalRemark can you check out this branch, try this code, and review it?
For debugging edit distance https://phiresky.github.io/levenshtein-demo/
From our debugging today, it looks like there are two problems:
t
at the end of kit
vs. kitt
, is currently being counted as 0
edit distance incorrectly (it should be 1)n
at the end of kittn
and kitten
after a deletion (or perhaps any mismatch).
Supersedes #15
Help would be much appreciated for the TODO items.
TODO:
test_single_character_deletion
doesn't seem to work for some reason.str.chars().nth()
because it makes the function O(n^2)