字符串相似性算法? [英] String similarity algorithms?

查看:170
本文介绍了字符串相似性算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要比较两个字符串,并计算出它们的相似性,过滤下来的最相似的字符串列表。

I need to compare 2 strings and calculate their similarity, to filter down a list of the most similar strings.

例如。搜索狗将返回

  1. 该死的
  2. 在沼泽

例如。搜索破解将返回

  1. 破解
  2. 俏皮话
  3. 插孔
  4. 嘎嘎

我所遇到的:

  • <一个href="http://orderedlist.com/our-writing/blog/articles/live-search-with-quicksilver-style/">QuickSilver
  • 的Liquidmetal
  • QuickSilver
  • LiquidMetal

你知道的更多的字符串相似的算法?

Do you know of any more string similarity algorithms?

推荐答案

看来你需要某种形式的模糊匹配。这是java实现的一些设置相似度的<一个href="http://web.archive.org/web/20081224234350/http://www.dcs.shef.ac.uk/~sam/stringmetrics.html">http://www.dcs.shef.ac.uk/~sam/stringmetrics.html.这里是字符串指标的更详细的解释<一个href="http://www.cs.cmu.edu/~wcohen/postscript/ijcai-ws-2003.pdf">http://www.cs.cmu.edu/~wcohen/postscript/ijcai-ws-2003.pdf这取决于如何模糊,如何快速的实现必须。

It seems you are needing some kind of fuzzy matching. Here is java implementation of some set of similarity metrics http://www.dcs.shef.ac.uk/~sam/stringmetrics.html. Here is more detailed explanation of string metrics http://www.cs.cmu.edu/~wcohen/postscript/ijcai-ws-2003.pdf it depends on how fuzzy and how fast your implementation must be.

这篇关于字符串相似性算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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