Skip to content
/ RE2 Public

The source code of paper "Think Rationally about What You See: Continuous Rationale Extraction for Relation Extraction" at SIGIR 2023.

Notifications You must be signed in to change notification settings

THU-BPM/RE2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Think Rationally about What You See: Continuous Rationale Extraction for Relation Extraction

PyTorch

The code is based on PyTorch 1.13+. You can find tutorials here.

Data

Download the SemEval dataset and place it under the semeval directory. The data directory should have the following structure:

    semeval/
        train_sentence.json
        train_label_id.json
        test_sentence.json
        test_label_id.json
    utils.py
    train.py
    models.py
    dataset.py

Usage

Run the full model on SemEval dataset with default hyperparameters

python3 train.py

This will train and evaluate our model. You may download the checkpoint from Google Drive as the parameters are tuned based on this checkpoint. You may migrate this repository and apply the same method to SURE.

Acknowledgements

We thank the authors of the original SemEval dataset and the Transformers library for their contributions.

About

The source code of paper "Think Rationally about What You See: Continuous Rationale Extraction for Relation Extraction" at SIGIR 2023.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages