slczgwh / REDN

Downstream Model Design of Pre-trained Language Model for Relation Extraction Task

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PWC PWC PWC

REDN

This is the prototype code for Relation Extraction Downstream Network of pre-trained language model, supporting our paper Downstream Model Design of Pre-trained Language Model for Relation Extraction Task.

Part of this code are revised based on OPENNRE.

Datasets

You can get Datasets from OPENNRE and WebNLG 2.0

Getting Start

Set your own paths in example/configs.py, including pre-trained model path, root path of data and output name. Run example/redn_trainer.py with args dataset and mode. dataset can be nyt10, semeval or webnlg. mode can be t for training and e for evaluation. For example ,to train SemEval, try

python redn_trainer semeval t

Another Branch

We establish a new branch based on Allennlp . It will be more friendly and powerful while using in real projects, though developers should spend sometime to write dataset-readers.

Logs

If you are not able to run these codes, you can also check all the logs in ./logs.

About

Downstream Model Design of Pre-trained Language Model for Relation Extraction Task

License:MIT License


Languages

Language:Python 100.0%