In MySQL, how can I compare two strings and get matching percentage. Something like this:
compare(needle, haystack) = percentage
compare("foo", "food") = 0.75
compare("foo", "foobar") = 0.5
compare("foo", "foofoo") = 1.0
compare("foo", "fo") = 0.0
I hope you get the idea :)
From stackoverflow
-
Please see:
Lukáš Lalinský : Based on the examples, I don't think he wants edit distance.Mitch Wheat : Perhaps it will give the poster an idea of how to proceed?
0 comments:
Post a Comment