How do you implement a “Did you mean”? [duplicate]

2019-01-03 07:49发布

Possible Duplicate:
How does the Google “Did you mean?” Algorithm work?

Suppose you have a search system already in your website. How can you implement the "Did you mean:<spell_checked_word>" like Google does in some search queries?

标签: nlp
17条回答
祖国的老花朵
2楼-- · 2019-01-03 08:19

Why not use google's did you mean in your code.For how see here http://narenonit.blogspot.com/2012/08/trick-for-using-googles-did-you-mean.html

查看更多
可以哭但决不认输i
3楼-- · 2019-01-03 08:21

Soundex is good for phonetic matches, but works best with peoples' names (it was originally developed for census data)

Also check out Full-Text-Indexing, the syntax is different from Google logic, but it's very quick and can deal with similar language elements.

查看更多
再贱就再见
4楼-- · 2019-01-03 08:22

Check this article on wikipedia about the Levenshtein distance. Make sure you take a good look at Possible improvements.

查看更多
别忘想泡老子
5楼-- · 2019-01-03 08:22

I believe Google logs all queries and identifies when someone makes a spelling correction. This correction may then be suggested when others supply the same first query. This will work for any language, in fact any string of any characters.

查看更多
登录 后发表回答