Giter VIP home page Giter VIP logo

spn4re's Introduction

Joint Entity and Relation Extraction with Set Prediction Networks

GitHub stars GitHub forks

Source code for Joint Entity and Relation Extraction with Set Prediction Networks. We would appreciate it if you cite our paper as following:

@article{sui2020joint,
  title={Joint Entity and Relation Extraction with Set Prediction Networks},
  author={Sui, Dianbo and Chen, Yubo and Liu, Kang and Zhao, Jun and Zeng, Xiangrong and Liu, Shengping},
  journal={arXiv preprint arXiv:2011.01675},
  year={2020}
}

Model Training

Requirement:

Python: 3.7   
PyTorch: >= 1.5.0 
Transformers: 2.6.0

NYT Partial Match

  • Note That: Replacing BERT_DIR in the command line with the actual directory of BERT-base-cased in your machine!!!
  • 注意:需将命令行中的BERT_DIR替换为你机器中实际存储BERT的目录!!!
python -m main --bert_directory BERT_DIR --num_generated_triples 15 --na_rel_coef 1 --max_grad_norm 1 --max_epoch 100 --max_span_length 10

NYT Exact Match

python -m main --bert_directory BERT_DIR --num_generated_triples 15 --max_grad_norm 2.5 --na_rel_coef 0.25 --max_epoch 100 --max_span_length 10

or

python -m main --bert_directory BERT_DIR --num_generated_triples 15 --max_grad_norm 1 --na_rel_coef 0.5 --max_epoch 100 --max_span_length 10

WebNLG Partial Match

python -m main --bert_directory BERT_DIR --batch_size 4 --num_generated_triples 10 --na_rel_coef 0.25 --max_grad_norm 20  --max_epoch 100 --encoder_lr 0.00002 --decoder_lr 0.00005 --num_decoder_layers 4 --max_span_length 10 --weight_decay 0.000001 --lr_decay 0.02

Trained Model Parameters

Model parameters can be download in Baidu Pan (key: SetP) 😎

spn4re's People

Contributors

dianbowork avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.