Giter Site home page Giter Site logo

rsman's Introduction

RSMAN

Source code for NAACL 2022 paper: Relation-Specific Attentions over Entity Mentions for Enhanced Document-Level Relation Extraction

Introduction

This is the implementation of the RSMAN (Relation-Specific Mention Attention Network) with SSAN as the backbone model. RSMAN is easy to be plugged into other different backbone models to enhance them and here we take SSAN for example. Part of the code is borrowed from https://github.com/BenfengXu/SSAN, and we really appreciate it.

Requirements

  • python==3.6
  • pytorch==1.4.0
  • transformers==2.7.0

Dataset

  • DocRED
  • DWIE
  • Note that you should process DWIE to fit the same format as DocRED. Put the dataset into the directory ./data.

Train

Download pre-trained language models into the directory ./pretrained_lm and run:

python run.py

The evaluation on dev set will be run during training at each logging step, and the trained model corresponding to the best dev result will be saved into the directory ./checkpoints.

Test

To get the result on test set, run:

python run.py --do_train False --do_predict

Then a test result file in the official evaluation format will be saved as ./checkpoints/result.json. Compress and submit it to CodaLab to get the final test score.

We also provide our trained model and test result file, you can download them from here.

rsman's People

Contributors

fduyjx avatar

Stargazers

 avatar crazyjeek avatar Amit Kushwaha avatar phzh avatar zgd avatar  avatar leebit avatar  avatar  avatar  avatar Faith avatar potter  avatar Marcus Kalander avatar WangZhen avatar AnIdealRing avatar  avatar

Watchers

 avatar

rsman's Issues

DWIE数据集处理问题

您好,您的这篇论文写的很好,看了你的文章对我很有启发。
请问是否可以公开您将DWIE数据集处理为DocRED 格式的代码?这将对我会很有帮助。
方便的话可以发送到我的邮箱,[email protected]
期待你的回复,不胜感激!

DWIE训练结果求助

您好,之前看到您在LogiRE论文的Issue提到,BiLSTM的F1只能到40左右,但您论文中还是引用了LogiRE的数据,请问后来BiLSTM能得到接近50%的结果了么?

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.