GithubHelp home page GithubHelp logo

qa-ir's Introduction

Question Answering and Information Retrieval

Setup environment

You need Python 3.6.

Anaconda is strongly recommended for the following steps.

conda create -n qair python=3.6

source activate qair

PyTorch 1.0

conda install pytorch torchvision -c pytorch

If your machine support CUDA it will do the setup for you!

Gensim 3.x

conda install gensim

Spacy 2.x

conda install -c conda-forge spacy

python -m spacy download en

Scikit-learn

conda install -c conda-forge scikit-learn

Tabulate

```conda install tabulate``

Download and preprocess required data

Download the TRECQA and WikiQA dataset

Create a directory called original_data in the main directory and download the WikiQA dataset archive in it.

run the bash script:

sh get_data.sh

Download the embeddings of choice:

Common Crawl (840B tokens, 2.2M vocab, cased, 300d vectors, 2.03 GB download): glove.840B.300d.zip

for all the models but Severyn2016 (it requires the embeddings in https://github.com/aseveryn/deep-qa)

move the embeddings into a embs directory and convert them in textual format calling them glove.txt and alexi.bin respectfully.

process the dataset the dataset

sh process_data.sh

Running the model

python -m qair.train configs/severyn2016.json wikiqa --name severyn_2016

Results are printed on screen and saved in the severyn_2016 directory

Changelog

By now there are 3 model implemented (the original Severyn 2016 model) a CNN Baseline and a simplified version of the Relational CNN.

More model to come ...

qa-ir's People

Contributors

andreazampieri avatar dbonadiman avatar

Watchers

 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.