Arshdeep Arshdeep - 10 months ago 63
PHP Question

How to calculate the percentage of similarity or difference between two texts / strings?

Explaining it further

Assume i have two strings like below


I am a super boy who can Fly! Really .

I am super boy who can Break walls!
Really .


So some characters are similar
I am super boy who can
and
Really .
.
Is there anything ready to use to find percentage similarity/diffrence between those two strings.

Answer Source

You should look into Levenshtein Distance.

http://en.wikipedia.org/wiki/Levenshtein_distance

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download