• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Google style "Did you mean" feature

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Help!

I need to write a Google style "Did you mean" function built on SQL pretty quick, any quick hint, tips or sample codes for doing this?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One aspect of this problem is when a user misspells or uses a word that sounds right but is gramatically wrong.

Years ago I wrote a phonetic lookup mechanism for a legal firm coping with court transcripts. Here is a demo and some discussion.
The Apache commons project has collected the several toolkits for phonetic lookup. (The commons project is a great source for a lot of tools.)
Bill
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which database are you using? Oracle 10g has a SOUNDEX function for phonetic string-based search.

Oracle FAQ : Soundex

Sid
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my less-than-humble opinion, Soundex is practically worthless. The guy who wrote the Metaphone algorithm that I implemented came to this conclusion years ago. Soundex is completely dependent on getting the first letter right so it can't detect the similarity of this common mixup:

cite
sight
site

Just for one example.
Bill
 
Well THAT's new! Comfort me, reliable tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic