How to compare text
-
27-09-2019 - |
Question
Like the title, How to compare text?. For a example, go to textdiff.com.
Solution
Check out Levenshtein distance. This is a fairly general algorithm for identifying differences between two strings.
OTHER TIPS
You may want to have a look at Pear's Text_Diff
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow