有没有为C#编写任何模糊搜索或字符串相似函数库? [英] Are there any Fuzzy Search or String Similarity Functions libraries written for C#?

查看:89
本文介绍了有没有为C#编写任何模糊搜索或字符串相似函数库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有类似的问题,但不是关于我可以在我的源代码中使用的C#库。

There are similar question, but not regarding C# libraries I can use in my source code.

谢谢大家的帮助。

我已经看过lucene,但是我需要一些更容易搜索类似字符串的东西,而不需要索引部分的开销。

I've already saw lucene, but I need something more easy to search for similar strings and without the overhead of the indexing part.

推荐答案

Levenshtein距离实现:

Levenshtein distance implementation:

  • Using LINQ (not really, see comments)
  • Not using LINQ

我有一个.NET 1.1项目使用后者。这是简单的,但完美地为我所需要的。从我记得它需要一些调整,但没有什么不是很明显。

I have a .NET 1.1 project in which I use the latter. It's simplistic, but works perfectly for what I need. From what I remember it needed a bit of tweaking, but nothing that wasn't obvious.

这篇关于有没有为C#编写任何模糊搜索或字符串相似函数库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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