开发者

How to compare text

Like the titl开发者_如何学Ce, How to compare text?. For a example, go to textdiff.com.


Check out Levenshtein distance. This is a fairly general algorithm for identifying differences between two strings.


You may want to have a look at Pear's Text_Diff

http://pear.php.net/package/Text_Diff/


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


if you're looking for a terminal command, check out diff, found in linux by default. You can also have it on windows by installing cygwin [with a LOT of excess baggage. :\ ]


I would suggest Jaccard's Similarity coefficient. Treating each sentence as a unit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜