开发者

Are there java libraries to do a word-based diff?

开发者 https://www.devze.com 2022-12-31 16:30 出处:网络
I have two pieces of text. I would like to make a word-based diff between them (like whe unix utility wdiff does) but with more information in the output (I mean, the character\'s posizion where the a

I have two pieces of text. I would like to make a word-based diff between them (like whe unix utility wdiff does) but with more information in the output (I mean, the character's posizion where the added/delited word starts).

I need to do this in Java, so a simple output of the differences (l开发者_开发问答ike wdiff) doesn't suite for me: I would like to manipulate objects representing differences.


There's Diff,Match,Patch - available in Java, and a demo is avilable - it seems to do word differences.

0

精彩评论

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

关注公众号