This is a PyTorch implementation of a paper Ranking Paragraphs for Improving Answer Recall in Open-Domain Question Answering (Lee et al. 2018). Code implementations are based on the DrQA repository, and few additional experiments on entity based QA were conducted with @donghyeonk.
- Install cuda-9.0
- Install Pytorch 0.4.1
- Python version >= 3.5 is required
Follow datasets and enviromental setups described in the DrQA repository.
# Pretrain reader model
$ python entityqa/reader/train.py
# Pretrain ranker model
$ python entityqa/ranker/train.py
# Evaluate QA pipeline
$ python entityqa/pipeline/predict.py --query-type SQuAD --ranker-type default --reader-type default
See codes for argument details of each file.