有没有办法生成某种文本的哈希值以进行比较?

发布于 2024-12-18 17:32:27 字数 181 浏览 0 评论 0原文

我不知道我想要的是否可能,但是是这样的:

假设我有几个短语,我想生成可以代表文本的该短语的某种较少的字符串。我将把它应用到很多文本中。之后,我比较生成的字符串,看看一个文本与另一个文本有多少不同。

我不需要知道差异在哪里或检索原始字符串,我只需要它来比较字符串。

有这样的事吗?我使解决方案变得复杂?

I don't know if what I want is possible, but is this:

Suppose I have a few phrases, I want to generate some kind of fewer string of that phrase that can represent the text. I will apply this for a lot of texts. After that, I compare the resulting strings to see how much different are one text from the other.

I don't need to know where are the differences or retrieve the original string, I only need this to compare strings.

There is something like this? I'm complicating the solution?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

双手揣兜 2024-12-25 17:32:27

有这样的技术,称为模糊散列。看看 ssdeep。您可能还对使用上下文触发分段散列识别几乎相同的文件一文感兴趣。

There is such technique and is called fuzzy hashing. Take a look at ssdeep. You also might be interested in the paper Identifying almost identical files using context triggered piecewise hashing.

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