GithubHelp home page GithubHelp logo

darrenyaoyao / rescnn_relationextraction Goto Github PK

View Code? Open in Web Editor NEW
105.0 10.0 40.0 81.92 MB

Deep Residual Learning for Weakly-Supervised Relation Extraction: https://arxiv.org/abs/1707.08866

Python 100.00%

rescnn_relationextraction's Introduction

ResCNN_RelationExtraction

Deep Residual Learning for Weakly-Supervised Relation Extraction: https://arxiv.org/abs/1707.08866 By Yi Yao (Darren) Huang, William Wang

Table of Contents

  1. Introduction
  2. Citation
  3. Model
  4. Result

Introduction

This work discuss about how we solve the noise from distant supervision. We propose the Deep Residual Learning for relation extraction and mitigate the influence from the noisy in semi-supervision training data. This paper is published in EMNLP2017.

Citation

If you use this model and the concept in your research, please cite:

  @InProceedings{huang-wang:2017:EMNLP2017,
      author    = {Huang, YiYao  and  Wang, William Yang},
      title     = {Deep Residual Learning for Weakly-Supervised Relation Extraction},
      booktitle = {Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing},
      month     = {September},
      year      = {2017},
      address   = {Copenhagen, Denmark},
      publisher = {Association for Computational Linguistics},
      pages     = {1804--1808},
      url       = {https://www.aclweb.org/anthology/D17-1191}
    }

Architecture

Result

Result vector1.txt: You can use Glove vector or Word2Vec. Here is the link I used in experiment : https://drive.google.com/open?id=0B-ZjKY509crKQXA0Y2FfbFJMY0E

rescnn_relationextraction's People

Contributors

darrenyaoyao 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rescnn_relationextraction's Issues

input_x传值错误请求大神帮助

您好,我跑了train.py,得到如下报错,谷歌了好多没有解决,希望您有空能回复下我,报错如下:
/home/lijing/Envs/information_ex/bin/python /home/lijing/Desktop/resre/ResCNN_RelationExtraction-master/ResidualCNN9/train.py

Parameters:
ALLOW_SOFT_PLACEMENT=True
BATCH_SIZE=64
CHECKPOINT_EVERY=100
DROPOUT_KEEP_PROB=0.5
EMBEDDING_DIM=50
EVALUATE_EVERY=1000
FILTER_SIZES=3
L2_REG_LAMBDA=0.0
LOG_DEVICE_PLACEMENT=False
NUM_EPOCHS=200
NUM_FILTERS=128
SEQUENCE_LENGTH=100

WordTotal= 114044
Word dimension= 1
RelationTotal: 53
Start loading training data.

Start loading testing data.

570088 96678
2017-10-09 11:13:25.942678: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09 11:13:25.943045: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09 11:13:25.943053: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09 11:13:25.943059: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09 11:13:25.943065: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Finish randomize data
Start Training
Writing to /home/lijing/Desktop/resre/ResCNN_RelationExtraction-master/ResidualCNN9/runs/1507518810

Initialize variables.
Batch data
Traceback (most recent call last):
File "/home/lijing/Desktop/resre/ResCNN_RelationExtraction-master/ResidualCNN9/train.py", line 152, in
loss = train_step(x_batch, y_batch, p1_batch, p2_batch)
File "/home/lijing/Desktop/resre/ResCNN_RelationExtraction-master/ResidualCNN9/train.py", line 110, in train_step
feed_dict)
File "/home/lijing/Envs/information_ex/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 895, in run
run_metadata_ptr)
File "/home/lijing/Envs/information_ex/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1100, in _run
% (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (64, 100, 1) for Tensor 'input_x:0', which has shape '(?, 100, 50)'

Process finished with exit code 1

我的环境如下:
bleach (1.5.0)
html5lib (0.9999999)
jieba (0.39)
Markdown (2.6.9)
network (0.1)
nltk (3.2.5)
numpy (1.13.3)
pip (9.0.1)
protobuf (3.4.0)
pudb (2017.1.1)
Pygments (1.3)
scikit-learn (0.19.0)
setuptools (36.5.0)
six (1.11.0)
tensorflow (1.3.0)
tensorflow-tensorboard (0.1.7)
Werkzeug (0.12.2)
wheel (0.30.0)

您好,我想问一下,我在使用你的模型时,在进行预测的时候,模型的给出的预测值,总是一个固定值,没有变化,我想请问一下,这个是什么问题。

您好,我想问一下,我在使用你的模型时,在进行预测的时候,模型的给出的预测值,总是一个固定值,没有变化,我想请问一下,这个是什么问题。

Originally posted by @Mariobai in #5 (comment)

你好,我想问一下你这预测是在哪里预测的,为什么我这找不到呢?

Where is vector1.txt?

I get this error when running train.py:

FileNotFoundError: [Errno 2] No such file or directory: '../data/vector1.txt'

Where can I get vector1.txt?

Evaluation

how you evaluate the pr?
i couldn't understand your code about this part.

数据处理请问

W = tf.Variable(tf.random_uniform([62, 5],
minval=-math.sqrt(6/(3position_size+3embedding_size)),
maxval=math.sqrt(6/(3position_size+3embedding_size))),
name="W")
这几行代码的功能是为了干什么啊?

Test data is not correctly loaded

if data[0]+"\t"+data[1] not in self.bags_test:

The test data should be collected for each entity pair in the map, self.bags_test (map<str, list>); however, the keys are set in a different way when a key is checked(L96). This bug effects test.py and test scores.

CURRENT : if entity1+"\t"+entity2 not in self.bags_test:
SUGGESTED : if entity1+" "+entity2 not in self.bags_test:

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.