用于自由文本差异的 Java 库 [英] Java library for free-text diff

查看:16
本文介绍了用于自由文本差异的 Java 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要匹配两个几乎相同的长自由文本字符串;即,尽可能找到索引到索引的对应关系.

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.

对 Java 库有什么建议吗?

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.

推荐答案

这个可能不错 差异匹配补丁.

这篇关于用于自由文本差异的 Java 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆