Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REGULAR: A Framework for Relation-Guided Multi-Span Question Generation

main

Install Packages

  • run

      pip install -r requirements.txt
    

Download Models and Data

Introduction to this Repository

  • This repository contains the code and data of the papre REGULAR: A Framework for Relation-Guided Multi-Span Question Generation. The contents of each subfolder or zipfile are shown below:
  |-DATA.zip            # You should unzip this file first                
    |- corpus           # Open-Source corpus for construct MSQA dataset
    |- MultiSpanQA_data # Dataset for training QA model used in step 4
    |- QG_train_data    # Dataset for training QG model used in step 3 
    |- REGULAR_DATASET  # Synthetic Dataset used in our experiment
  |- MODEL      # Pre-trained Models for construct MSQA dataset    
  |- SCRIPT     # Bash scripts
  |- SOURCE     # Code for step 1-5
    |- 1_convert_passage_to_graph   # Code for step 1  
    |- 2_extract_answers            # Code for step 2
    |- 3_generate_question          # Code for step 3
    |- 4_select_optimal_question    # Code for step 4
    |- 5_construct_msqa_dataset     # Code for step 5
  |- TMP        # Directory for temporary outputs

Enviroments

  • python: 3.9.13
  • CUDA Version: 11.7
  • GPU: Tesla V100 32GB

Constructing MSQA Dataset

  • run each bash file in the SCRIPTS directory. Each file in the in the SCRIPTS directory is named with number. Each bash file is named with a number at the beginning, which represents the order in which it should be run. Therefore, you only need to run the files starting with 1, 2, 3_1, 3_2, 4_1, 4_2, and 5 in sequence, like:

    # After clone this repository
    cd REGULAR
    sh SCRIPTS\1_convert_passage_to_graph.sh
    
  • After running these bash files, you are excepted to obtain the final output directory in TMP/REGULAR_dataset, which contains train file and validation file for fine-tuning QA models.

Contact Us

  • FEEL FREE to contact us if you have any questions or encounter issues while using the repository.

20251220 Update

  • This article has been accepted by AACL-IJCNLP 2025 recently.
  • We have uploaded the camera-ready version of the paper REGULAR.pdf.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages