Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java library for free-text diff [closed]

I need to match up two almost-the-same long freetext strings; i.e., to find index-to-index correspondences wherever possible.

Because this is freetext, the comparison should not be line-based as in code diffing.

Any suggestions for Java libraries?

A simple example (In real life , of course, there would not be extra whitespace to line things up, and there may be more complex challenges like entire clauses moved around.)

The quick brown  fox jumped over the  lazy     dog.
||||||||||      |||||||||||||||||||||         |||||
The quick yellow fox jumped over the well-bred dog.
like image 916
Joshua Fox Avatar asked Jan 26 '09 12:01

Joshua Fox


1 Answers

This one might be good Diff Match Patch.

like image 161
Joshua Fox Avatar answered Sep 29 '22 11:09

Joshua Fox