All Projects → ElizaLo → Question-Answering-based-on-SQuAD

ElizaLo / Question-Answering-based-on-SQuAD

Licence: other
Question Answering System using BiDAF Model on SQuAD v2.0

Projects that are alternatives of or similar to Question-Answering-based-on-SQuAD

Bi Att Flow
Bi-directional Attention Flow (BiDAF) network is a multi-stage hierarchical process that represents context at different levels of granularity and uses a bi-directional attention flow mechanism to achieve a query-aware context representation without early summarization.
Stars: ✭ 1,472 (+7260%)
Mutual labels:  question-answering, squad, bidaf
question-answering
No description or website provided.
Stars: ✭ 32 (+60%)
Mutual labels:  question-answering, squad, bidaf
co-attention
Pytorch implementation of "Dynamic Coattention Networks For Question Answering"
Stars: ✭ 54 (+170%)
Mutual labels:  question-answering, squad
Chat
基于自然语言理解与机器学习的聊天机器人,支持多用户并发及自定义多轮对话
Stars: ✭ 516 (+2480%)
Mutual labels:  question-answering, natural-language-understanding
Awesome Qa
😎 A curated list of the Question Answering (QA)
Stars: ✭ 596 (+2880%)
Mutual labels:  question-answering, squad
CompareModels TRECQA
Compare six baseline deep learning models on TrecQA
Stars: ✭ 61 (+205%)
Mutual labels:  question-answering, nlp-machine-learning
TOEFL-QA
A question answering dataset for machine comprehension of spoken content
Stars: ✭ 61 (+205%)
Mutual labels:  question-answering, natural-language-understanding
Deeppavlov
An open source library for deep learning end-to-end dialog systems and chatbots.
Stars: ✭ 5,525 (+27525%)
Mutual labels:  question-answering, nlp-machine-learning
MLH-Quizzet
This is a smart Quiz Generator that generates a dynamic quiz from any uploaded text/PDF document using NLP. This can be used for self-analysis, question paper generation, and evaluation, thus reducing human effort.
Stars: ✭ 23 (+15%)
Mutual labels:  question-answering, nlp-machine-learning
Bidaf Keras
Bidirectional Attention Flow for Machine Comprehension implemented in Keras 2
Stars: ✭ 60 (+200%)
Mutual labels:  question-answering, natural-language-understanding
Chatbot
Русскоязычный чатбот
Stars: ✭ 106 (+430%)
Mutual labels:  question-answering, natural-language-understanding
Medi-CoQA
Conversational Question Answering on Clinical Text
Stars: ✭ 22 (+10%)
Mutual labels:  question-answering, squad
SQUAD2.Q-Augmented-Dataset
Augmented version of SQUAD 2.0 for Questions
Stars: ✭ 31 (+55%)
Mutual labels:  question-answering, squad
qa
TensorFlow Models for the Stanford Question Answering Dataset
Stars: ✭ 72 (+260%)
Mutual labels:  question-answering, squad
PersianQA
Persian (Farsi) Question Answering Dataset (+ Models)
Stars: ✭ 114 (+470%)
Mutual labels:  question-answering, squad
Tapas
End-to-end neural table-text understanding models.
Stars: ✭ 583 (+2815%)
Mutual labels:  question-answering, nlp-machine-learning
extractive rc by runtime mt
Code and datasets of "Multilingual Extractive Reading Comprehension by Runtime Machine Translation"
Stars: ✭ 36 (+80%)
Mutual labels:  question-answering, squad
Dan Jurafsky Chris Manning Nlp
My solution to the Natural Language Processing course made by Dan Jurafsky, Chris Manning in Winter 2012.
Stars: ✭ 124 (+520%)
Mutual labels:  question-answering, nlp-machine-learning
Insuranceqa Corpus Zh
🚁 保险行业语料库,聊天机器人
Stars: ✭ 821 (+4005%)
Mutual labels:  question-answering, natural-language-understanding
Haystack
🔍 Haystack is an open source NLP framework that leverages Transformer models. It enables developers to implement production-ready neural search, question answering, semantic document search and summarization for a wide range of applications.
Stars: ✭ 3,409 (+16945%)
Mutual labels:  question-answering, squad

Question Answering with SQuAD using BiDAF model

Hits

Implemented a Bidirectional Attention Flow neural network as a baseline, improving Chris Chute's model implementation, adding word-character inputs as described in the original paper and improving GauthierDmns' code.

You can reproduce the work following the Set-Up section, and potentially (recommended!) train the model on a single GPU setting the cuda variable in config.py to True.

SQuAD

Question-answer pairs for a sample passage in the SQuAD dataset. Each of the answers is a segment of text from the passage.

Model Architecture

BiDAF Architecture Source: BiDAF paper

Requirements

  • Python 3.6

Code Organization

├── config.py          <- Configuration file with data directories and hyperparamters to train the model
├── data_loader.py     <- Define an iterator who collects batches of data to train the model
├── eval.py            <- Evaluate the model on a new pair of (context, question)
├── layers.py          <- Define the various layers to be used by the main BiDAF model
├── make_dataset.py    <- Download the SquAD dataset and pre-process the data for training
├── model.py.          <- Define the BiDAF model architecture
├── requirements.txt   <- Required Python libraries to build the project
├── test.py            <- Test the performance of a trained model on the DEV dataset
├── train.py           <- Train a model using the TRAIN dataset only
├── utils.py           <- Group a bunch of useful functions to process the data

Results

Loss and Metrics

Exact-Match and F1 Score on Validation set after training:

EM F1
0.64 0.75

Set-Up

  • Clone the repository
  • Create a directory for your experiments, logs and model weights: mkdir output
  • Download GloVE word vectors: https://nlp.stanford.edu/projects/glove/
  • Modify the config.py file to set up the paths where your GloVE, SquAD and models will be located
  • Create a Python virtual environment, source to it: mkvirualenv qa-env ; workon qa-env if you use virtualenvwrapper
  • Install the dependencies: pip install -r requirements.txt ; python -m spacy download en
  • Run python make_dataset.py to download SquAD dataset and pre-process the data
  • Run python train.py to train the model with hyper-parameters found in config.py
  • Run python test.py to test the model EM and F1 scores on Dev examples
  • Play with eval.py to answer your own questions! :)

Next Steps

  • set up a variable to choose between training the model with word only VS word + characters
  • collect the moving average of the weights during training and use them during testing
  • add the ability to train the model on multiple GPUs, and offer half-precision training to speed-up the training
  • improve this baseline using pre-training encoding such as BERT, and/or set-up a multi-task learning pipeline to jointly learn to answer questions together with another closely related NLP task.

Useful Articles

Useful Links

Problems that can be

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].