Home

Awesome

neural_question_generation

Implemenration of <Learning to Ask: Neural Question Generation for Reading Comprehension> by Xinya Du et al.

The source code still needs to be modified

  1. Model
  1. Dataset

processed data provided by Xinya Du et al.

Requirements

Usage

  1. Data preprocessing
mkdir data/processed
python process_data.py
  1. Download & process GloVe
wget http://nlp.stanford.edu/data/glove.840B.300d.zip -P data/
unzip data/glove.840B.300d.zip -d data/
python process_embedding.py # This will take a couple of minutes
  1. Train model
# data_name : dataset name which is defined in run.sh
# hyperparameters : hyperparameters setting which is defined in params.py
# epochs: training epochs

bash run.sh train [data_name] [hyperparameters] [epochs]
# example : bash run.sh train squad basic_params 10
  1. Test model
mkdir result # only for the first time, predicted result will be saved here
bash run.sh pred [data_name] [hyperparameters] 0 
# example : bash run.sh pred squad basic_params 0