Code Monkey home page Code Monkey logo

copy_re's Introduction

UPDATE: This paper is part of the Multiple Relation Extraction task. More information can be found in Multiple Relational Facts Extraction.

This code is for ACL2018 paper "Extracting Relational Facts by an End-to-End Neural Model with Copy Mechanism"

Environment

Data

You need to modify the data path in const.py before running the code. The pre-processed data is released.

WebNLG:

NYT:

Or, you can download them (without pre-trained word embedding) in Baidu SkyDrive with code "y286".

Train

python main.py -c config.json -t 0 -cell lstm

The cell can be "gru" or "lstm". You can specify the GPU card number by "-g". For exampe, "python main.py -c config.json -t 0 -cell lstm -g 0".

Test or Valid

You need to set the epochs of the model in main.py first. Then run the following commands: python main.py -c config.json -t 1 -cell lstm

"-t 1" means test and "-t 2" means valid.

Data process

The data_process can help you understand how did we process the data.

copy_re's People

Contributors

xiangrongzeng 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.