创建思想"您是不是要找XYZ"功能进入网站 [英] Ideas for creating a "Did you mean XYZ" feature into website

查看:126
本文介绍了创建思想"您是不是要找XYZ"功能进入网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想给用户通过企业的大名单进行搜索的能力,但仍然发现附近的匹配。

I'd like to give users the ability to search through a large list of businesses, but still find near matches.

有没有人对如何最好地去了解这个,当你不针对简单的字典单词,但任何建议,而不是复杂的名称,如ABC公司名称?

Does anyone have any recommendations on how best to go about this when you're not targeting simple dictionary words, but instead complex names like ABC Business Name?

问候。

推荐答案

查看上 Levenshtein距离维基百科的文章。这是一个相当简单的概念来包装你的头部周围和pretty容易实现在任何语言你正在使用一种算法,在你的情况下,C#。

Check out the wikipedia article on Levenshtein distance. It's a fairly simple concept to wrap your head around and pretty easy to implement an algorithm in whichever language you are using, in your case, C#.

我发现在C#示例对您这里

I found an example in C# for you here.

此外,这里是从谷歌的彼得·诺维格拼写校正的一个例子。据说在SO播客几集以前,乔恩斯基特试图在C#中同一算法的重写。不知道他是否完成了它和/或使公众提供虽然。

Also, here is an example of a spelling corrector from Peter Norvig of Google. It was said on the SO podcast a few episodes ago that Jon Skeet attempted a rewrite of this same algorithm in C#. Not sure if he completed it and/or made it publicly available though.

这篇关于创建思想"您是不是要找XYZ"功能进入网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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