Skip to content
/ ATLOP Public

Source code for paper "Document-Level Relation Extraction with Adaptive Thresholding and Localized Context Pooling", AAAI 2021

Notifications You must be signed in to change notification settings

wzhouad/ATLOP

Repository files navigation

ATLOP

Code for paper Document-Level Relation Extraction with Adaptive Thresholding and Localized Context Pooling.

If you make use of this code in your work, please kindly cite the following paper:

@article{zhou2020atlop,
  title={Document-Level Relation Extraction with Adaptive Thresholding and Localized Context Pooling},
  author={Zhou, Wenxuan and Huang, Kevin and Ma, Tengyu and Huang, Jing},
  journal={Arxiv},
  year={2020}
}

Requirements

Dataset

The DocRED dataset can be downloaded following the instructions at link. The expected structure of files is:

ATLOP
 |-- dataset
 |    |-- train_annotated.json        
 |    |-- train_distant.json
 |    |-- dev.json
 |    |-- test.json
 |-- meta
 |    |-- rel2id.json

Training and Evaluation

Train the BERT model on DocRED with the following command:

>> bash ./run_bert.sh  # for BERT
>> bash ./run_roberta.sh  # for RoBERTa

The training loss and evaluation scores on the development set will be automatically synced to the wandb dashboard.

The program will generate a test file result.json in the official evaluation format. You can compress and submit it to Colab for the official test score.

About

Source code for paper "Document-Level Relation Extraction with Adaptive Thresholding and Localized Context Pooling", AAAI 2021

Resources

Stars

Watchers

Forks

Packages

No packages published