用于对齐打乱线的差异工具

发布于 2024-08-25 05:34:44 字数 334 浏览 3 评论 0原文

假设我有两个相同的文档,只是行被打乱了。有没有一个工具可以通过绘制线条来连接文档 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

戏蝶舞 2024-09-01 05:34:46

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).

一瞬间的火花 2024-09-01 05:34:46

我刚刚在谷歌搜索中发现了 psame (位于至少在算法上)做同样的事情。

I just discovered psame in a google search which (at least algorithmically) does the same thing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文