百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

fuzzystring

> 编程语言
开源

C# 中的近似字符串比较

200 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

C# 中的近似字符串比较

fuzzystring

Approximate String Comparision in C#

Originally Hosted on Codplex http://fuzzystring.codeplex.com

Project Description

FuzzyString is a library developed for use in my day job for reconciling naming conventions between different models of the electric grid. I have stripped off the power system specific code and put together what can effectively be used as a string extension for determining approximate equality between two strings. All of the algorithms used here have been pulled from online resources, translated into C#, and compiled into this library. I found several other similar open-source implementations around but nothing for .NET/C#. Adding the *.dll to your project will give you access to this extension and the individual extensions under the hood of the ApproximatelyEquals() extension.

Algorithms included in this project

  • Hamming Distance|http://en.wikipedia.org/wiki/Hamming_distance
  • Jaccard Distance|http://en.wikipedia.org/wiki/Jaccard_index
  • Jaro Distance|http://en.wikipedia.org/wiki/Jaro_distance
  • Jaro-Winkler Distance|http://en.wikipedia.org/wiki/Jaro_distance
  • Levenshtein Distance|http://en.wikipedia.org/wiki/Levenshtein_distance
  • Longest Common Subsequence|http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
  • Longest Common Substring|http://en.wikipedia.org/wiki/Longest_common_substring
  • Overlap Coefficient|http://en.wikipedia.org/wiki/Overlap_coefficient
  • Ratcliff-Obershelp Similarity|http://www.morfoedro.it/doc.php?n=223&lang=en
  • Sorensen-Dice Distance|http://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient
  • Tanimoto Coefficient|http://en.wikipedia.org/wiki/Tanimoto_coefficient#Tanimoto_coefficient_.28extended_Jaccard_coefficient.29

Approximate String Comparision

Note: This sample is taken from the legacy documentation on CodePlex.

While all of the algorithms are exposed and can be used and can provide their raw results, they have been conveniently combined in a way that they can selectively be used to judge the approximate equality of two strings. This is done through the ApproximatelyEquals extension and by setting the desired FuzzyStringComparisonOptions and FuzzyStringComparisonTolerance.

For two strings that are desired to be compared approximately, a boolean response of equality can be garnered in the following way:

…

Issues· 15 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言