I am using PHP’s similar_text() call to compare two strings, however, I am not getting good enough results, for example, the best I’m getting is 80.95% for a match that I’d like to see 100% on.
What other functions can I use to get the strings down to the core?
<!-- Overcast, Rain or Showers compared Overcast, Rain or Showers is 80.9523809524 -->
<!-- Overcast, Risk of Rain or Showers compared Overcast, Rain or Showers is 86.2068965517 -->
<!-- Overcast, Chance of Rain or Showers compared Overcast, Rain or Showers is 83.3333333333 -->
Levenshtein distance: http://php.net/manual/en/function.levenshtein.php
It’s reverse to similar_text(), so 0% means there is no difference.