|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
How does google show entered word's correct word
I wanted to know how does google advise words, if we enter wrong spelling.
Like if i enter "abdimen", it says Did you mean: abdomen How does that can be done? Is it done in a query? Thanx |
|
#2
|
||||
|
||||
|
They've written a full out application, I'm sure, that contains common misspellings. But you can also replicate this to a certain degree by using Soundex queries which matches based on what a search term "sounds like" rather than how it's spelled. This is commonly called a "fuzzy search". Be advised, however, that Soundex matches are much less efficient than traditional queries so using them on large data sets, or sets containing a lot of joins will result in a much longer processing time.
A common query like this: SELECT FirstName, LastName FROM tblEmployees WHERE FirstName = 'John'; Might instead look like this: SELECT FirstName, LastName FROM tblEmployees WHERE SOUNDEX('Jon') = SOUNDEX(FirstName) In this case a search for "Jon" might result in records for both "Jon" and "John".
__________________
Scripting problems? Windows questions? Ask the Windows Guru! Stay up to date with all of my latest content. Follow me on Twitter! Help us help you! Post your exact error message with these easy tips! Last edited by Nilpo : September 7th, 2009 at 09:38 AM. |
|
#3
|
||||
|
||||
|
Here's an awesome article about employing fuzzy searches in an MSSql environment.
http://anastasiosyal.com/archive/2009/01/11/18.aspx |
|
#4
|
||||
|
||||
|
Thats nice
Thanx Nilpo. I was also wondering if its a query based or more that that. |
|
#5
|
||||
|
||||
|
Quote:
![]() |
|
#6
|
||||
|
||||
|
Quote:
To answer your question, I'm sure with Google it's much more than query based. Their search engine is multi-layered so that a singnle search can return many different types of results. For instance, it's possible to look up the definition of a word (a dictionary search) right from their main search box. There is likely some application on the backend that controls all of this. I highly doubt they are using simple soundex queries. However, it does provide an alternative for those of us who don't have billions of dollars to throw at application development. lol |
|
#7
|
||||
|
||||
|
Quote:
![]() Google might have a whole set of apps for doing things that they do Just wanted to know if its possible using a query, and glad to know you can ![]() |
|
#8
|
||||
|
||||
|
Just as a side note, Micky, Google does allow API access to their Search Suggestions. Maybe this provides an option for you since their search suggestions include alternate spellings.
|
|
#9
|
||||
|
||||
|
Quote:
![]() Thanx Rob ![]() |
|
#10
|
|||||
|
|||||
|
Ok, I have a Google Search API key that I use on my site so I started playing with the Google Suggestions feature. It's not so pretty to implement if you're not actually performing a search.
BUT.... I found this nifty little trick that works marvelously. The Google Toolbar uses a shortcut REST API that returns suggestions in XML format based on a GET request. http://google.com/complete/search?output=toolbar&q=searchterm So something like: http://google.com/complete/search?o...bar&q=microsoft Returns a nicely formatted XML response. xml Code:
So now with a misspelling like "micrsoft" it returns the top result as "Microsoft". A quick easy way to get an alternative for a "Did you mean..." type of application. |
|
#11
|
||||
|
||||
|
Brilliant......... i asked a question, and you gave a whole book of answers
![]() Thanx again Rob ![]() |
|
#12
|
||||
|
||||
|
lol. I don't sleep.
![]() |
|
#13
|
||||
|
||||
|
Quote:
![]() |
![]() |
| Viewing: ASP Free Forums > Other > ASP Free Lounge > How does google show entered word's correct word |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|