All Projects → nlpdata → strategy

nlpdata / strategy

Licence: other
Improving Machine Reading Comprehension with General Reading Strategies

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to strategy

verseagility
Ramp up your custom natural language processing (NLP) task, allowing you to bring your own data, use your preferred frameworks and bring models into production.
Stars: ✭ 23 (-34.29%)
Mutual labels:  question-answering, machine-reading-comprehension
expmrc
ExpMRC: Explainability Evaluation for Machine Reading Comprehension
Stars: ✭ 58 (+65.71%)
Mutual labels:  question-answering, machine-reading-comprehension
unanswerable qa
The official implementation for ACL 2021 "Challenges in Information Seeking QA: Unanswerable Questions and Paragraph Retrieval".
Stars: ✭ 21 (-40%)
Mutual labels:  question-answering, machine-reading-comprehension
Question-Answering-based-on-SQuAD
Question Answering System using BiDAF Model on SQuAD v2.0
Stars: ✭ 20 (-42.86%)
Mutual labels:  question-answering
Dynamic-Coattention-Network-for-SQuAD
Tensorflow implementation of DCN for question answering on the Stanford Question Answering Dataset (SQuAD)
Stars: ✭ 14 (-60%)
Mutual labels:  question-answering
FreebaseQA
The release of the FreebaseQA data set (NAACL 2019).
Stars: ✭ 55 (+57.14%)
Mutual labels:  question-answering
BERT-for-Chinese-Question-Answering
No description or website provided.
Stars: ✭ 75 (+114.29%)
Mutual labels:  question-answering
KMRC-Research-Archive
🗂 Research about Knowledge-based Machine Reading Comprehension
Stars: ✭ 25 (-28.57%)
Mutual labels:  machine-reading-comprehension
TransTQA
Author: Wenhao Yu ([email protected]). EMNLP'20. Transfer Learning for Technical Question Answering.
Stars: ✭ 12 (-65.71%)
Mutual labels:  question-answering
HHH-An-Online-Question-Answering-System-for-Medical-Questions
HBAM: Hierarchical Bi-directional Word Attention Model
Stars: ✭ 44 (+25.71%)
Mutual labels:  question-answering
QANet
A TensorFlow implementation of "QANet: Combining Local Convolution with Global Self-Attention for Reading Comprehension"
Stars: ✭ 31 (-11.43%)
Mutual labels:  question-answering
TeBaQA
A question answering system which utilises machine learning.
Stars: ✭ 17 (-51.43%)
Mutual labels:  question-answering
MSMARCO-MRC-Analysis
Analysis on the MS-MARCO leaderboard regarding the machine reading comprehension task.
Stars: ✭ 20 (-42.86%)
Mutual labels:  machine-reading-comprehension
calcipher
Calculates the best possible answer for multiple-choice questions using techniques to maximize accuracy without any other outside resources or knowledge.
Stars: ✭ 15 (-57.14%)
Mutual labels:  question-answering
Instahelp
Instahelp is a Q&A portal website similar to Quora
Stars: ✭ 21 (-40%)
Mutual labels:  question-answering
explicit memory tracker
[ACL 2020] Explicit Memory Tracker with Coarse-to-Fine Reasoning for Conversational Machine Reading
Stars: ✭ 35 (+0%)
Mutual labels:  question-answering
pair2vec
pair2vec: Compositional Word-Pair Embeddings for Cross-Sentence Inference
Stars: ✭ 62 (+77.14%)
Mutual labels:  question-answering
dialogbot
dialogbot, provide search-based dialogue, task-based dialogue and generative dialogue model. 对话机器人,基于问答型对话、任务型对话、聊天型对话等模型实现,支持网络检索问答,领域知识问答,任务引导问答,闲聊问答,开箱即用。
Stars: ✭ 96 (+174.29%)
Mutual labels:  question-answering
extractive rc by runtime mt
Code and datasets of "Multilingual Extractive Reading Comprehension by Runtime Machine Translation"
Stars: ✭ 36 (+2.86%)
Mutual labels:  question-answering
QA HRDE LTC
TensorFlow implementation of "Learning to Rank Question-Answer Pairs using Hierarchical Recurrent Encoder with Latent Topic Clustering," NAACL-18
Stars: ✭ 29 (-17.14%)
Mutual labels:  question-answering

Reading Strategies

Status: Archive (code is provided as-is, no updates expected).

Overview

We re-implement the original core code that was finished at Tencent AI Lab (Bellevue). We have tested the code and made sure the code has the same performance to the original one reported in the paper.

If you find this code useful, please cite the following paper.

  • Improving Machine Reading Comprehension with General Reading Strategies (arXiv)
@inproceedings{sun2019improving,
  title={Improving Machine Reading Comprehension with General Reading Strategies},
  author={Sun, Kai and Yu, Dian and Yu, Dong and Cardie, Claire},
  booktitle={Proceedings of the NAACL-HLT},
  address={Minneapolis, MN},
  url={https://arxiv.org/abs/1810.13441v2},
  year={2019}
}

Code

You can follow the instructions below to train models for RACE.

  • Get necessary files
    1. Go to code and create a folder named data in it.
    2. Download RACE from http://www.cs.cmu.edu/~glai1/data/race/, unzip it to code/data/ so that the training, development, and testing sets are in code/data/RACE/train, code/data/RACE/dev, and code/data/RACE/test, respectively.
    3. Execute python preprocess.py to generate race_train.json, race_dev.json, and race_test.json in code/data.
    4. Execute python gencloze.py to generate race_train.json, race_dev.json, and race_test.json in code/cloze.
    5. Download pre-trained language model from https://github.com/openai/finetune-transformer-lm, and copy the model folder model to code/.
  • Train a model with the original input sequence (i.e., [dq$o] where d, q, o represent document, question, and answer option, respectively, and [, $, ] represent start token, delimiter token, and end token, respectively).
    1. Execute python train.py --submit --n_iter 1 --data_dir cloze/ to fine-tune the original pre-trained model on the automatically generated cloze questions.
    2. Execute python train.py --submit --n_iter 5 --resume to fine-tune the model to RACE dataset with 5 training epochs.
  • Train a model with the reverse input sequence (i.e., [o$qd])
    1. python train.py --submit --n_iter 1 --data_dir cloze/ --submission_dir submission_oqd/ --save_dir save_oqd/ --log_dir log_oqd/.
    2. python train.py --submit --n_iter 5 --resume --submission_dir submission_oqd/ --save_dir save_oqd/ --log_dir log_oqd/.
  • Get the accuracy on the test set of each single model and the ensemble model.
    1. python evaluate.py.

Tips:

  1. You may want to specify --n_gpu (e.g., 8) and --n_batch (e.g., 1) based on your environment.
  2. There is randomness in both cloze question generation and model training, so you may want to run multiple times to choose the best model based on development set performance. You may also want to set different seeds (specify --seed when running train.py).

Environment

The code has been tested with Python 3.6/3.7, Tensorflow 1.4, and Tesla P40.

Other Useful Code

You can refer to this repository for a finetuned transformer baseline based on BERT.

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].