Source code and data for ACL2022 (findings) paper "HiCLRE: A Hierarchical Contrastive Learning Framework for Distantly Supervised Relation Extraction"(Dongyang Li, Taolin Zhang, Nan Hu, Chengyu Wang, Xiaofeng He)
- python 3.7
- pytorch-1.8.1
- transformers-4.10.3
- tqdm
- sklearn
All of the dataset files should be put in ./benchmark/no_preprocessing
Step 1: Data Preprocessing
python benchmark/data_preprocessing.py
Step 2: Training
python example/train_distant.py \
--dataset nyt10 \
--batch_size 24
Thank OpenNRE for the help of partial codes and datasets.