GithubHelp home page GithubHelp logo

hjmzy / eider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yiqingxyq/eider

0.0 0.0 0.0 730 KB

Source code for paper "EIDER: Empowering Document-level Relation Extraction with Efficient Evidence Extraction and Inference-stage Fusion", ACL Findings, 2022

Shell 0.44% C++ 27.30% Python 53.77% Cuda 18.50%

eider's Introduction

Eider

Code for ACL 2022 Finding paper "EIDER: Empowering Document-level Relation Extraction with Efficient Evidence Extraction and Inference-stage Fusion"

Dataset

The DocRED dataset can be downloaded following the instructions at link. Noted that the dev.json file has been modified in Aug, 2021. The modified version contains 998 documents. We use the original version of dev.json, which contains 1000 documents.

The expected structure of files is:

Eider
 |-- dataset
 |    |-- docred
 |    |    |-- train_annotated.json        
 |    |    |-- train_distant.json
 |    |    |-- dev.json
 |    |    |-- test.json
 |-- meta
 |    |-- rel2id.json

Coreference Results Required by Eider_rule

We use hoi as the coreference model for Eider_rule. The processed data can be found here.

The expected structure of files is:

Eider
 |-- coref_results
 |    |-- train_annotated_coref_results.json
 |    |-- dev_coref_results.json
 |    |-- test_coref_results.json

Training and Inference

Train Eider-BERT on DocRED with the following commands:

>> bash scripts/train_bert.sh eider test hoi
>> bash scripts/test_bert.sh eider test hoi

Alternatively, you can train Eider-RoBERTa using:

>> bash scripts/train_roberta.sh eider test hoi
>> bash scripts/test_roberta.sh eider test hoi

The commands for Eider_rule is similar:

>> bash scripts/train_bert.sh eider test hoi # BERT
>> bash scripts/test_bert.sh eider test hoi

>> bash scripts/train_roberta.sh eider test hoi # RoBERTa
>> bash scripts/test_roberta.sh eider test hoi

Citation

If you make use of this code in your work, please kindly cite the following paper:

@inproceedings{xie2021eider,
      title={EIDER: Empowering Document-level Relation Extraction with Efficient Evidence Extraction and Inference-stage Fusion}, 
      author={Yiqing Xie and Jiaming Shen and Sha Li and Yuning Mao and Jiawei Han},
      year={2022},
      booktitle = {Findings of the 60th Annual Meeting of the Association for Computational Linguistics},
      publisher = {Association for Computational Linguistics},
}

eider's People

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.