Text similarity algorithm

后端 未结 5 2006
萌比男神i
萌比男神i 2020-12-24 15:08

I have two subtitles files. I need a function that tells whether they represent the same text, or the similar text

Sometimes there are comments like \"The w

5条回答
  •  渐次进展
    2020-12-24 16:05

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

    Anything other than a result of zero means the text are not "identical". "Similar" is a measure of how far/near they are. Result is an integer.

提交回复
热议问题