用于对齐打乱线的差异工具
假设我有两个相同的文档,只是行被打乱了。有没有一个工具可以通过绘制线条来连接文档 A 中的哪些行与文档 B 中的哪些行相对应(有点像 Cairo 是否用于机器翻译单词对齐)?
如果文件有一定程度的不同行怎么办(我不想弄清楚哪些行彼此相似——如果某行没有完全匹配,则该行不匹配。)
注意:我不想对文件进行排序并比较它们,而是希望直观地了解文件相对于彼此的无序程度,以及哪些特定区域倾向于一起移动,以及哪些区域倾向于被打乱。
Suppose I have two documents that are identical except the lines are shuffled. Is there a tool that can show me which lines in document A correspond to which lines on document B by drawing lines to connect them (kinda like Cairo does for machine translation word alignments)?
What if the files have some level of differing lines (I don't want to figure out which lines are similar to each other -- if there isn't an exact match for a line, then that line has no match.)
Note: I am not looking to sort the files and compare them, rather I am looking to get a visualization of how far out of order the files are relative to each other, and which particular regions tend to move together, and which tend to be shuffled.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Windiff 将向您显示左侧文件中的行,它认为右侧文件中的行来自该行,但当行相同时(例如 cc 文件中只有一个 } 的行),它经常会出错。
Windiff will show you the line in the left file it thinks the line in the right file came from, but it's often mistaken when lines are the same (e.g. a line with just a } in a cc file).
我刚刚在谷歌搜索中发现了 psame (位于至少在算法上)做同样的事情。
I just discovered psame in a google search which (at least algorithmically) does the same thing.