string-similarity
string-similarity copied to clipboard
High similarity result
Hi, I am getting a suspiciously high similarity value for these strings:
3:Númenor Aragorn The Shire usher1b
4:Rivendell Elrond Mordor usher2
5:mordor Sauron mordor usher1a
7:Minas Tirith Faramir Lorien usher1B
8:Lorien Haldir minas tirith usher2B
2:The Shire Bilbo The Shire Usher2A
3:Númenor Aragorn The Shire usher1b
4:Rivendell Elrond Mordor usher2
5:mordor Sauron mordor usher1a
7:Minas Tirith Faramir Lorien usher1B
8:Lorien Haldir minas tirith usher2B
the cosine similarity is 0.991, although a whole line is missing from the first string, is this really the expected result?
Given the length of the strings, a high similarly is expected. 0.991 indeed seems absurdly high. However, I could not say whether this is correct or not; It's almost a decade ago that I wrote this code, and I have not worked with it since
Same issue here... this shouldn't yield this similarity
pry(main)> String::Similarity.cosine("north augsta", "restaurants")
=> 0.8029550685469661
From this similarity calculator: