Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Levenshtein maximum distance is greater than length of both strings #87

Open
GoogleCodeExporter opened this issue Aug 4, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link


What steps will reproduce the problem?
--------------------------------------
Compute the levenshtein distance between "709113544" and "1555855732":
var dmp = new diff_match_patch();
var diffs = dmp.diff_main("709113544", "1555855732");
var distance = dmp.diff_levenshtein(diffs);

--------------------------------------
What is the expected output? 
10 (that's the length of the bigger string)
What do you see instead?
14

--------------------------------------
What version of the product are you using? On what operating system?
Javascript version 20121119. Running in node.js, also reproduced in chrome: 
http://plnkr.co/Qgi9q4IyWmguK5mIAMxy

Original issue reported on code.google.com by [email protected] on 22 May 2013 at 7:28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant