Git Product home page Git Product logo

relationclassification-rl's Introduction

Reinforcement Learning for Relation Classification from Noisy Data

Relation classification from noisy data, aiming to categorize semantic relations between two entities given a plain text with the automantically generated training data. previous studies adopt multi-instance learning to consider the noises of instances and can not handle the sentence-level prediction. In this work, we propose a new model for relation classification, which consists of an instance selector and a relation classifier. This formalization enables our model to extract relations at the sentence level from noisy data. We provide the source code and datasets of the AAAI 2018 paper: "Reinforcement Learning for Relation Classification from Noisy Data".

DataSets

We provide dataset in data folder. The data is download from [data]. They preprocess the original data to make it satisfy the input format of the codes. The data is originally released by the paper "Sebastian Riedel, Limin Yao, and Andrew McCallum. Modeling relations and their mentions without labeled text.". [Download]

To run out code, the dataset should be put in the data folder. There're two sub-folders pretrain/ and RE/ and a file vec.bin in the data/ folder.

Codes

We publish the codes of "Reinforcement Learning for Relation Classification from Noisy Data" here. We refer to the implement code of NRE model published at [code].

Compile

Just type "make" in the corresponding folder.

Train

For training, you need to type "./main [method] [alpha]" in the corresponding folder.

The output of the model will be saved in folder result/.

Parameter Setting:

  • method: current training process. "rlpre" means pretrain the instance selector. "rl" means jointly train the instance selector and relation classifier.
  • alpha: learning rate

Test

For test, you need to type "./main test" in the corresponding folder.

Cite

If you use the code, please cite the following paper: [Feng et al. 2016] Jun Feng, Minlie Huang, Li Zhao, Yang Yang, and Xiaoyan Zhu. Reinforcement Learning for Relation Classification from Noisy Data. In AAAI2018. [pdf]

Reference

[1] [Lin et al., 2016] Yankai Lin, Shiqi Shen, Zhiyuan Liu, Huanbo Luan, and Maosong Sun. Neural Relation Extraction with Selective Attention over Instances. In Proceedings of ACL.

relationclassification-rl's People

Contributors

junefeng avatar

Watchers

James Cloos avatar Junshuai Song 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.