Giter Site home page Giter Site logo

autocomplete's Introduction

autocomplete

AutoComplete word "search" engine. Connects to redis and exposes 2 APIs (using Flask): "Store" a given word and "Suggest" a completion for a given word. gui.py contains a preview of how to use those apis + example of storing words from csv is found in main.py.

Suggest takes 12~ ms for receiving a word with redis containing 330K words + score. Storage is implemented as a variance of reverse index on redis, when all prefixes of a word is indexed as Prefix -> word. For example, storing "Rocky" will result in: "_R->Rocky", "_Ro->Rocky", "_Roc->Rocky", "_Rock->Rocky", "_Rocky->Rocky"

References:

  1. https://gist.github.com/emrahayanoglu/e28510026b6119bb276b4f00eb766e24
  2. https://thedatasingh.medium.com/autocomplete-using-redis-and-python-in-40-lines-78b95e36e5e1
  3. 330K words + frequenices csv file: https://www.kaggle.com/rtatman/english-word-frequency

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.