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

Explaining it further

Suppose I have two lines like below

I am a super boy who can fly! Really.

I am a super boy who can break walls! Really.

So, some characters are similar I am super boy who canand Really .. Is there anything ready to use to find the percentage similarity / difference between the two lines.

+3
source share
2 answers

You should look at the Levenshtein distance.

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

+4
source

SO PHP , .

, . Smith Waterman Gotoh , .

0

Source: https://habr.com/ru/post/1754406/


All Articles