Giter VIP home page Giter VIP logo

kylo's Introduction

Kylo - The FAQ Bot

How does it work?

Using Facebook's Infersent model we create sentence embeddings of the existing data. When a new text is queried, we calculate the cosine distance between the the query text and the existing embeddings. The highest value is considered as a match and returned as the answer.

Infersent

InferSent is a sentence embeddings method that provides semantic representations for English sentences. It is trained on natural language inference data and generalizes well to many different tasks.

Read the original paper - arxiv.

Setup

Make sure you have Python 3. Install the Python requirements:

pip install -r requirements.txt

run setup.sh to get the Infersent model and also all the word vectors. This project uses GloVe:

./setup.sh

Training

For training, add any new data in data/ directory. Check data/README.md for format instructions. Then run the training to save the embeddings in embeddings/ dir:

python train.py

Inference

To check, import find_best_match from inference:

from inference import find_best_match

print(find_best_match(text="are you open source"))

Server Deployment

This repository comes with a Tornado API server, with REST API and a websocket end point. To run the server:

python server.py

Todo

Check CONTRIBUTING.md for more details.

  • Build a dataset to evaluate accuracy
  • Evaluate GLoVe vs FastText
  • Work on improving accuracy
  • Handle common typos

Name

License

The mighty MIT license. Check LICENSE for more details.

kylo's People

Contributors

avinassh avatar

Stargazers

Neeraj Vashistha avatar Nabhoneel Majumdar avatar  avatar Roberto Salas avatar Satya Adda avatar  avatar Gopal Krishna avatar Mahmmoud Mahdi avatar Wannaphong Phatthiyaphaibun avatar Anne Bonner avatar Jetrois Mathurin avatar  avatar Marianna Janczak avatar Nidhin Pattaniyil avatar Hadjer Benmeziane avatar Javed Khan avatar

Watchers

Jetrois Mathurin avatar  avatar Calincan Mircea Ioan avatar  avatar paper2code - bot avatar

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.