Skip to content

Code and dataset for ACL 2021 paper "How Knowledge Graph and Attention Help?A Quantitative Analysis into Bag-level Relation Extraction".

Notifications You must be signed in to change notification settings

AmmieQi/how-KG-ATT-help

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

This directory contains code and data for the ACL 2021 paper How Knowledge Graph and Attention Help? A Quantitative Analysis into Bag-level Relation Extraction. Our implementation is based on THUNLP's RE-Context-or-Names.

1 Dataset

We provide preprocessed NYT-FB60K in data/, it has train.txt and test.txt. There is no development set for NYT-FB60K.

Please download the nyt.zip from google drive and put it under data/, then unzip it.

2 Train

Run the following scirpt:

cd code/nyt
bash train.sh

If you want to skip the training time, you can download our finetuned model nyt_bert-base-uncased_TransE_re_direct__kg.mdl from google drive. and put it under save/nyt/.

3 Test

After you get finetuned model, please run the following scirpt:

cd code/nyt
bash test.sh

About

Code and dataset for ACL 2021 paper "How Knowledge Graph and Attention Help?A Quantitative Analysis into Bag-level Relation Extraction".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • Shell 1.3%