Skip to content

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

License

Notifications You must be signed in to change notification settings

yanghoonkim/neural_question_generation

Repository files navigation

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
  • Embedding

    • Pretrained GloVe embeddings
    • Randomly initialized embeddings
  • RNN-based seq2seq

    • GRU/LSTM
  • To be updated

    • Post-processing code for unknown words
  1. Dataset

processed data provided by Xinya Du et al.

Requirements

  • python 2.7
  • numpy
  • Tensorflow 1.4

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 

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published