Skip to content

Source code and data for [Cross-relation Cross-bag Attention for Distantly-supervised Relation Extraction]

Notifications You must be signed in to change notification settings

yuanyu255/PCNN_C2SA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cross-relation Cross-bag Attention for Distantly-supervised Relation Extraction

Source code and data for [Cross-relation Cross-bag Attention for Distantly-supervised Relation Extraction] (https://arxiv.org/abs/1812.10604)

--------------------------------------------------------------------------------

Training relation extractor with Cross-relation Cross-bag Attention:

  • employ the sentence-level selective attention to reduce the effect of noisy or mismatched sentences, while the correlation among relations were captured to improve the quality of attention weights.
  • try to pay more attention to entity-pairs with a higher quality.

Environment

Python 2.7 Pytorch 0.3.0

Data

We include NYT dataset in the Data folder.

Train

A demo is provided and can be execurated by:

python train.py

Test

After training, the model will be saved in /model

python test.py

Reference

Please cite the following paper if you find the codes useful:

@article{yuan2018cross,
  title={Cross-relation Cross-bag Attention for Distantly-supervised Relation Extraction},
  author={Yuan, Yujin and Liu, Liyuan and Tang, Siliang and Zhang, Zhongfei and Zhuang, Yueting and Pu, Shiliang and Wu, Fei and Ren, Xiang},
  journal={arXiv preprint arXiv:1812.10604},
  year={2018}
}

About

Source code and data for [Cross-relation Cross-bag Attention for Distantly-supervised Relation Extraction]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages