Skip to content
/ AMNRE Public

Source code and dataset for COLING2018 paper "Adversarial Multi-lingual Neural Relation Extraction".

License

Notifications You must be signed in to change notification settings

thunlp/AMNRE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMNRE

Introduction

Source code and dataset for COLING2018 paper "Adversarial Multi-lingual Neural Relation Extraction".

Requirements

  • pytorch==0.3.1
  • scikit-learn==0.19.1
  • numpy==1.14.1
  • matplotlib==2.1.2

Data

We use the same dataset and pre-trained word embedding as the MNRE. You can download the raw data in this page. You need to download it to the Data/ path and use init.py in CNN/src/ to preprocess it.

We also provide the preprocessed .npy format data in this page. Download it to the Data/ path and unpack it, then you can run the code.

Run

Run python train.py in corresponding directory to train the model. It will output the average precision on test set to AUC.txt and the prediction result as .npy every epoch.

Run python draw.py <label file's name> <prediction result file's name> <output image's name> to get the precision-recall curve for one specific prediction result.

If you want to tune the hyper parameters, see the src/constant.py and change the parameters defined in the file.

Cite

If the codes help you, please cite the following paper:

Xiaozhi Wang, Xu Han, Yankai Lin, Zhiyuan Liu, Maosong Sun. Adversarial Multi-lingual Neural Relation Extraction (COlING 2018)

About

Source code and dataset for COLING2018 paper "Adversarial Multi-lingual Neural Relation Extraction".

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages