UniRel
released code for our EMNLP22 paper: UniRel: Unified Representation and Interaction for Joint Relational Triple Extraction
Install / Use
/learn @wtangdev/UniRelREADME
UniRel
Released code for our EMNLP22 paper: UniRel: Unified Representation and Interaction for Joint Relational Triple Extraction.
Join the Discord if there are any questions.
Updates
- 2023-06-01
- Add multi-token entity implementation.
- Provide
UniRelclass inpredict.pyfor easy inference and a checkpoint trained on nyt (multi-token) for trying.
Model

Results


Usage
Prerequisites
UniRel is implemented with Python == 3.8 and pytorch == 1.7.1, Other main requirments are:
- tdqm
- transformers == 4.12.5
- wandb
The detail requirments could be found at requirements.txt
Data
We obtain the data from TPLinker, please kindly refer to TPLinker officail repository. Change two filename of the download data:
train_data.json->train_split.jsontest_triples.json->test_data.json
You can also download the data from here
Pretrained Model
We use the bert-base-cased model from Huggingface, you can download it by following their instrcution or let Transformers to automatically download. After that, place the files at the root directory of the project (./bert-base-cased).
I provided a checkpoint for trying predict. You can download here.
Train & Evalutaion
All parameter are listed in the script run_nyt.sh and run_webnlg.sh. By run with command bash run_nyt.sh can do train and evaluation.
Citation
@inproceedings{tang-etal-2022-unirel,
title = "{U}ni{R}el: Unified Representation and Interaction for Joint Relational Triple Extraction",
author = "Tang, Wei and
Xu, Benfeng and
Zhao, Yuyue and
Mao, Zhendong and
Liu, Yifeng and
Liao, Yong and
Xie, Haiyong",
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
month = dec,
year = "2022",
address = "Abu Dhabi, United Arab Emirates",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2022.emnlp-main.477",
pages = "7087--7099",
}
Have a nice day.
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
