/SG-Deep-Question-Generation

This repository contains code and models for the paper: Semantic Graphs for Generating Deep Questions (ACL 2020).

Primary LanguagePythonMIT LicenseMIT

Semantic Graphs for Generating Deep Questions

This repository contains code and models for the paper: Semantic Graphs for Generating Deep Questions (ACL 2020). Below is the framework of our proposed model (on the right) together with an input example (on the left).

Model Framework

Requirements

Environment

pytorch 1.4.0
nltk 3.4.4
numpy 1.18.1
tqdm 4.32.2

Data Preprocessing

We release all the datasets below which are processed based on HotpotQA.

  1. get tokenized data files of documents, questions, answers, and the results of Dependency Parsing and Coreference Resolution on documents

  2. prepare the json files ready as illustrated in build-semantic-graphs

  3. run scripts/preprocess_data.sh to get the preprocessed data ready for training

Models

We release both classifier and generator models in this work. The models are constructed based on a sequence-to-sequence architecture. Typically, we use GRU and GNN in the encoder and GRU in the decoder, you can choose other methods (e.g. Transformer) which have also been implemented in our repository.

Training

Translating / Testing

Citation

    @article{pan2019sgdqg,
      title={Semantic Graphs for Generating Deep Questions},
      author={Liangming Pan and Yuxi Xie and Yansong Feng and Tat-Seng Chua and Min-Yen Kan},
      journal={ACL 2020},
      year={2020}
    }