Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 1.07 KB

File metadata and controls

28 lines (24 loc) · 1.07 KB

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.