phporcaffeine Posted November 26, 2007 Share Posted November 26, 2007 Trying to find something written in PHP that would do a google style "did you mean". I could just screen scrap from Google but then I would have to give them some sort of 'powered by' credit and I'd rather not. I would like to 'in-house' it. Anyone know of anything? -TIA Quote Link to comment Share on other sites More sharing options...
Wuhtzu Posted November 26, 2007 Share Posted November 26, 2007 It is referred to as "Google suggestion"-script I think http://www.ajaxfreaks.com/tutorials/6/0.php Else do a search for "ajax php google suggestion" Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 26, 2007 Share Posted November 26, 2007 this forum is about writing your own script, not third party, so anyway the idea behind it is you use some sort of system + a dictionary to give suggestions. This requires a fairly extensive dictionary that would be developed based on past searching criteria. i.e each time a person does a search if the number results is favorable, record that is a "good" query. Then you store each "good" query in a database with its count next to it (ignoring derrivations of it). then you perform regex or some other test to find the bad query matching set of "good" queries. Then you use realvaence between term A and Term B or the Good Query count of the terms B to determine which suggestion is the "best" and display it. The only challenge to this is the relativeness between user input and the database, and building up a good db Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.