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

editops's result do not match the ratio's result #51

Open
brealisty opened this issue Apr 13, 2020 · 2 comments
Open

editops's result do not match the ratio's result #51

brealisty opened this issue Apr 13, 2020 · 2 comments

Comments

@brealisty
Copy link

str1 = 'AB1010'
str2 = '1010AB'
ratio' result --> 0.6666, that means there are 4 steps(2 delete, 2 insert),(12-4)/12;
editops' result --> [('replace', 0, 0), ('replace', 1, 1), ('replace', 4, 4), ('replace', 5, 5)],
obviously, this anwser not match (12-4)/12, instead of (12-8)/12.

some differences in those two function about the edit distance?

@BobLd
Copy link

BobLd commented Apr 14, 2020

Not sure, but could be linked to an issue in the editops_from_cost_matrix function. Check a possible solution here: #16 (comment)

@maxbachmann
Copy link

Editops uses the normal uniform Levenshtein distance, while ratio uses the InDel Distance (no Substitutions). In this specific implementation this is achived by giving substitutions a weight of 2 which is similar to a Insertion + a Deletion.

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

No branches or pull requests

3 participants