Inspiration

This was originally from Stanford's 2016 Nifty Assignments. I was inspired to work on this project because I always wondered how Google's search engine worked.

What it does

This project is essentially Google's autocomplete. Based on the past searches, the program can predict what the user will type next based on the words already typed in.

How I built it

I wrote a program to process autocomplete queries for a given set of suggestion strings and associated weights. This means that given a query string, the program will find all suggestion strings that start with the query string, sorted by weight.The program first processes the suggestions and sorts them alphabetically. Then, it processes an autocomplete query to find all suggestions that start with the given query; and sort the matching suggestions in descending order by weight.

Challenges I ran into

A challenge that I ran into was how to constantly update the query suggestions as the user types in more letters. I fixed this by restarting the loop every time a new character is typed in, allowing the program to access a new batch of query suggestions that is closer to what the user is searching for, similar to Google's adaptive query suggestions.

Accomplishments that I'm proud of

It works!

What I learned

What's next for Autocomplete Me

In the future, I hope to incorporate Autocomplete Me in a search engine or an app.

Built With

Share this project:

Updates