比较字符串相似度
比较两个字符串以查看它们的相似程度的最佳方法是什么?
示例:
My String
My String With Extra Words
或者
My String
My Slightly Different String
我正在寻找的是确定每对中的第一个和第二个字符串的相似程度。我想对比较进行评分,如果字符串足够相似,我会认为它们是匹配对。
在 C# 中有没有好的方法可以做到这一点?
What is the best way to compare two strings to see how similar they are?
Examples:
My String
My String With Extra Words
Or
My String
My Slightly Different String
What I am looking for is to determine how similar the first and second string in each pair is. I would like to score the comparison and if the strings are similar enough, I would consider them a matching pair.
Is there a good way to do this in C#?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果有人想知道 @FrankSchwieterman 发布的 C# 等价物是什么:
If anyone was wondering what the C# equivalent of what @FrankSchwieterman posted is:
我正在比较两个这样的句子
Intersect 给你一组相同的单词列表,我继续查看计数并说如果它大于 1,则这两个句子包含相似的单词。
I am comparing two sentences like this
Intersect gives you a set of identical word lists , I continue by looking at the count and saying if it is more than 1, these two sentences contain similar words.