Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create the best autosuggest using machine learning

I am building an autosuggest functionality.

I have a set of data of about 23k entries, in this data is words, and combinations of multiple words, i.e. "London College of Arts" and "London".

I want to write an autocomplete search function that takes into account, the letters that have already been typed in, say "LO" but also some other data points I have:

  • location,

  • day of year,

  • number of previous searches,

  • scored items - say London College of arts has 20,000 students which makes it rank higher than "London school of economics" which only has 5,000 etc.

I am guessing from preliminary research that I need to start learning some kind of Machine learning technique, but exactly which would be best applied to this problem is still hard for me to see, SVN's, NN etc. I am finding it hard to find any practical examples of these algorithms being used on problems like this, any help or pointers to good resources is much appreciated.

like image 473
Simon Kenyon Shepard Avatar asked Nov 04 '22 20:11

Simon Kenyon Shepard


1 Answers

Look up Apache Solr (it might be overkill for your needs for auto-suggest only), but offers a pretty decent auto-suggest OOTB, without you having to create from scratch. Since it offers a RESTful interface you can integrate into most any language of choice.

You can also weight by contextual variables such as location, date etc. Solr is a powerful tool that does a lot more than auto-suggest, but might serve your needs.

like image 153
Mikos Avatar answered Nov 15 '22 08:11

Mikos