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

Question regarding result interpretation of RatcliffObershelpSimilarity #2

Open
OevreFlataeker opened this issue Jun 17, 2020 · 0 comments

Comments

@OevreFlataeker
Copy link

Just for my clarification: A comparison of two identical strings should always yield a 1.0 as result, correct?

string s1 = "hello world";
string s2 = "hello world";
double x = s1.RatcliffObershelpSimilarity(s2);
-> x = 0.7272727272

Also, I was trying to get the same numbers like on this page for reference checking: https://itnext.io/string-similarity-the-basic-know-your-algorithms-guide-3de3d7346227

But already the first example differs:

string1, string2 = "i am going home", "gone home"
textdistance.ratcliff_obershelp(string1, string2)
0.66

Your extension: 0.58333333

string1, string2 = "test", "text"
textdistance.ratcliff_obershelp(string1, string2)
0.75

Your extension: 0.5

Am I using the extension wrong or is there a problem with the implementation?

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

1 participant