#1
  1. Couch Potato Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Jan 2005
    Location
    India
    Posts
    13,651
    Rep Power
    2688

    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
    Laziness is my religion and Sunday is my God

    Get the Mantra!
  2. #2
  3. ASP Hero (2000 - 2499 posts)

    Join Date
    Jun 2006
    Location
    New Springfield, OH
    Posts
    2,045
    Rep Power
    1054
    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".
    Last edited by Nilpo; September 7th, 2009 at 08:38 AM.
    Don't like me? Click it.

    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!!
  4. #3
  5. ASP Hero (2000 - 2499 posts)

    Join Date
    Jun 2006
    Location
    New Springfield, OH
    Posts
    2,045
    Rep Power
    1054
    Here's an awesome article about employing fuzzy searches in an MSSql environment.

    http://anastasiosyal.com/archive/2009/01/11/18.aspx
  6. #4
  7. Couch Potato Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Jan 2005
    Location
    India
    Posts
    13,651
    Rep Power
    2688
    Thats nice
    Thanx Nilpo.

    I was also wondering if its a query based or more that that.
  8. #5
  9. Couch Potato Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Jan 2005
    Location
    India
    Posts
    13,651
    Rep Power
    2688
    Originally Posted by Nilpo
    Here's an awesome article about employing fuzzy searches in an MSSql environment.

    http://anastasiosyal.com/archive/2009/01/11/18.aspx
    Thanx again Rob
  10. #6
  11. ASP Hero (2000 - 2499 posts)

    Join Date
    Jun 2006
    Location
    New Springfield, OH
    Posts
    2,045
    Rep Power
    1054
    Originally Posted by micky
    Thanx again Rob
    No problem!

    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
  12. #7
  13. Couch Potato Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Jan 2005
    Location
    India
    Posts
    13,651
    Rep Power
    2688
    Originally Posted by Nilpo
    No problem!

    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
    ya, i wish had billions of dollars

    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
  14. #8
  15. ASP Hero (2000 - 2499 posts)

    Join Date
    Jun 2006
    Location
    New Springfield, OH
    Posts
    2,045
    Rep Power
    1054
    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.
  16. #9
  17. Couch Potato Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Jan 2005
    Location
    India
    Posts
    13,651
    Rep Power
    2688
    Originally Posted by Nilpo
    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.
    Thats nice to know, might come in handy

    Thanx Rob
  18. #10
  19. ASP Hero (2000 - 2499 posts)

    Join Date
    Jun 2006
    Location
    New Springfield, OH
    Posts
    2,045
    Rep Power
    1054
    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?ou...ar&q=microsoft

    Returns a nicely formatted XML response.
    xml Code:
    <?xml version="1.0"?>
    <toplevel>
    <CompleteSuggestion><suggestion data="microsoft office"/><num_queries int="234000000"/></CompleteSuggestion>
    <CompleteSuggestion><suggestion data="microsoft updates"/><num_queries int="50100000"/></CompleteSuggestion>
    <CompleteSuggestion><suggestion data="microsoft.com"/><num_queries int="306000000"/></CompleteSuggestion>
    <CompleteSuggestion><suggestion data="microsoft templates"/><num_queries int="6450000"/></CompleteSuggestion>
    <CompleteSuggestion><suggestion data="microsoft clip art"/><num_queries int="986000"/></CompleteSuggestion>
    <CompleteSuggestion><suggestion data="microsoft downloads"/><num_queries int="60100000"/></CompleteSuggestion>
    <CompleteSuggestion><suggestion data="microsoft money"/><num_queries int="124000000"/></CompleteSuggestion>
    <CompleteSuggestion><suggestion data="microsoft virtual earth"/><num_queries int="2190000"/></CompleteSuggestion>
    <CompleteSuggestion><suggestion data="microsoft publisher"/><num_queries int="11300000"/></CompleteSuggestion>
    <CompleteSuggestion><suggestion data="microsoft outlook"/><num_queries int="21200000"/></CompleteSuggestion>
    </toplevel>
    It's even ordered by relevance.

    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.
  20. #11
  21. Couch Potato Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Jan 2005
    Location
    India
    Posts
    13,651
    Rep Power
    2688
    Brilliant......... i asked a question, and you gave a whole book of answers

    Thanx again Rob
  22. #12
  23. ASP Hero (2000 - 2499 posts)

    Join Date
    Jun 2006
    Location
    New Springfield, OH
    Posts
    2,045
    Rep Power
    1054
    lol. I don't sleep.
  24. #13
  25. Couch Potato Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Jan 2005
    Location
    India
    Posts
    13,651
    Rep Power
    2688
    Originally Posted by Nilpo
    lol. I don't sleep.
    i thought so

Similar Threads

  1. Google and Yahoo results show more room for ad growth (Reuters)
    By RSS_News_User in forum Business News
    Replies: 0
    Last Post: April 23rd, 2006, 04:04 PM
  2. Google and Yahoo results show more room for ad growth (Reuters)
    By RSS_News_User in forum Technology News
    Replies: 0
    Last Post: April 23rd, 2006, 11:04 AM
  3. Demo show unveils Krugle, Google for developers (InfoWorld)
    By RSS_News_User in forum Technology News
    Replies: 0
    Last Post: February 7th, 2006, 08:03 PM
  4. High-Def Is the Word at Electronics Show (AP)
    By RSS_News_User in forum Technology News
    Replies: 0
    Last Post: January 7th, 2006, 08:02 PM
  5. show data with no values entered or in it
    By excaliburdotcom in forum ASP Development
    Replies: 1
    Last Post: January 7th, 2005, 08:42 PM

IMN logo majestic logo threadwatch logo seochat tools logo