in reply to Module to provide suggested terms for search?

That does sound tough. One possible algorithm you could try is Text::Soundex. I seem to remember some coverage in Joe Celko's SQL For Smarties book.

You might point out that Google will sell them a search appliance that no doubt has that feature along with lots of other neat Google features they probably want. Or you might not, if you like your job. ;)

-sam

  • Comment on Re: Module to provide suggested terms for search?

Replies are listed 'Best First'.
Re^2: Module to provide suggested terms for search?
by punch_card_don (Curate) on Jun 27, 2008 at 19:02 UTC
    Well, that's the thing. I think users are getting used to seeing Google's "Did you mean...?" and imagine it's a trivial piece of technology to ask for.
      And it's your job to disabuse them of that notion. Start with a thought experiment - "How much do you think Google paid to develop that feature?" Most people realize that Google has more money than God, so that might get them thinking...

      -sam

        Nah. You were right before. It's not quite trivial but it's not that hard either. You have two fronts to attack it. Double metaphone, like you said before, and just load up a mirror of your DB index with metaphone versions. IMDb, for example, does this with actor names. And the other is just to run the search through aspell or ispell. If something is spelled wrong and is not found in the DB index, suggest correctly spelled terms that are known to be in the index.

        update: hadn't read ahead when I wrote this to see that creamygoodness also suggested Aspell already. Wasn't trying to steal any ideas. :)

      I work with this kind of chalenge on my PhD thesis. But, considering this is not a complete perl related subject, I will not post about here now. If you or other wanna talk again, send private message.
      On the semantic aproach, it can be done, and is not so difficult. There are some Perl modules to help too.