Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.68 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.68 KB

AlignRE

This repository contains the official implementation for the paper: AlignRE: An Encoding and Semantic Alignment Approach for Zero-Shot Relation Extraction. The paper has been accepted to appear at ACL 2024 Findings.

Dataset

Place them to the /data folder.

Requirements

The main requirements are:

  • python==3.9.7
  • pytorch==1.13.1
  • transformers==4.44.2
  • sentence-transformers==2.2.2
  • numpy==1.22.3

Run

  1. Download the pretrained Bert weights to folder './BERT_MODELS/bert-base-uncased'.
  2. Download the pretrained Sentence-Bert weights to folder './BERT_MODELS/stsb-bert-base'.
  3. Set hyperparameters and run train.py

Cite

@inproceedings{li2024alignre,
  title={AlignRE: An Encoding and Semantic Alignment Approach for Zero-Shot Relation Extraction},
  author={Li, Zehan and Zhang, Fu and Cheng, Jingwei},
  booktitle={Findings of the Association for Computational Linguistics ACL 2024},
  pages={2957--2966},
  year={2024}
}

Acknowledgement

The framework of AlignRE is based on ZS-BERT and RE-Matching. Their contributions have greatly helped in the development and implementation of our code. We appreciate their efforts and the open-source community for fostering collaboration and knowledge sharing.