Code Monkey home page Code Monkey logo

rsn's Introduction

OpenRE

The source code of Relational Siamese Network (EMNLP2019)
Future up-to-date versions will be available in: https://github.com/thunlp/RSN

Environment

You only need TensorFlow(>=1.12.0) to run this code.
conda create -n rsn python=3.6
pip install networkx python-louvain tensorflow-gpu==1.12

Data

You can download data by:
bash download.sh
The data is already preprocessed from the original FewRel and Glove data.

Running CNN

A standard CNN for supervised RE can be trained by
cd CNN
python train_CNN.py

Running RSN

The Relational Siamese Network for OpenRE can be trained by
cd RSN
python train_RSN.py
By default it will be trained as a semi-supervised RSN.

A supervised RSN can be trained by
python train_RSN.py --trainset_loss_type cross --testset_loss_type none

Future Work

The FewRel-distant dataset and more models will be released in the future.

rsn's People

Contributors

mooninrain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rsn's Issues

GPU

I wonder what's the size of your gpu? Thank you~

cannot unzip data-bin.zip能麻烦提供一个国内方便的下载链接吗?

能麻烦提供一个国内方便的下载链接吗?比如百度云,谢谢
我这翻墙下了也没法解压啊

root@ubuntu-s-1vcpu-1gb-nyc1-01:~/RSN-master# unzip data-bin.zip 
Archive:  data-bin.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of data-bin.zip or
        data-bin.zip.zip, and cannot find data-bin.zip.ZIP, period.

NYT-FB Preprocess

Hi, I contacted Diego and got the dataset, but I am still confused about what to do with the original NYT-FB dataset.
Could you provide the code of process for the NYT-FB dataset, please?

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.