StringComparison icon indicating copy to clipboard operation
StringComparison copied to clipboard

Question regarding result interpretation of RatcliffObershelpSimilarity

Open OevreFlataeker opened this issue 4 years ago • 0 comments

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?

OevreFlataeker avatar Jun 17 '20 09:06 OevreFlataeker