dpappas / triviaqa

Code for the TriviaQA reading comprehension dataset

Home Page:http://nlp.cs.washington.edu/triviaqa/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehension

Requirements

General

  • Python 3. You should be able to run the evaluation scripts using Python 2.7 if you take care of unicode in utils.utils.py.
  • BiDAF requires Python 3 -- check the original repository for more details.

Python Packages

  • tensorflow (only if you want to run BiDAF, verified on r0.11)
  • nltk
  • tqdm

Evaluation

The dataset file parameter refers to files in the qa directory of the data (e.g., wikipedia-dev.json). For file format, check out the sample directory in the repo.

python3 -m evaluation.triviaqa_evaluation --dataset_file samples/triviaqa_sample.json --prediction_file samples/sample_predictions.json

Miscellaneous

  • If you have a SQuAD model and want to run on TriviaQA, please refer to utils.convert_to_squad_format.py

BiDAF

Evaluation

python3 -m evaluation.evaluate_bidaf --dataset_file <triviaqa-file> --bidaf_file <bidaf-prediction-file>

Code

The original code is available at here. A slightly modified version to run on TriviaQA is coming soon!

About

Code for the TriviaQA reading comprehension dataset

http://nlp.cs.washington.edu/triviaqa/


Languages

Language:Python 100.0%