Skip to content

Low dimensional CNN (Convolutinal Neural Network) for Relation_Extraction written in Python with Keras

Notifications You must be signed in to change notification settings

fs-melo/CNN_Relation_Extraction

Repository files navigation

CNN_Relation_Extraction

It contains the source code of my master's dissertation on the implementation of Extraction of relationships from unstructured data based on deep learning and distant supervision.

Here, our implementations of a low dimensional Convolutional Neural Network (CNN) for Relation_Extraction based in deeplearning4nlp-tutorial are available, however was used a dataset created by distant supervision.

This work presents an information extraction technique for extracting relation with CNN trained for the recognition of sentence patterns represented on low-dimension word2vec and position embeddings (of Named Entity).

What is this

The CNN architecture was implemented inspired by [Nguyen et al. 2015] and [Zeng et al., 2014]. We use a widely used dataset developed by Riedel 2010, available in [Lin et al., 2016]. This dataset was generated by aligning Freebase relationships with the NYT corpus.

This data set was treated using random stratified sampling for use in the training and testing of the proposed convolutional model using stratified k-fold cross-validation. Experiments show that the proposed model can achieve 87.0% precision and 88.0% recall.

The 01-preprocess_freebase.py file format Lin et al., 2016 dataset.

Reference

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

[Nguyen et al. 2015] Nguyen, Thien Huu, and Ralph Grishman. "Relation Extraction: Perspective from Convolutional Neural Networks."

[Zeng et al., 2014] Daojian Zeng, Kang Liu, Siwei Lai, Guangyou Zhou, and Jun Zhao. "Relation classification via convolutional deep neural network."

[Zeng et al.,2015] Daojian Zeng,Kang Liu,Yubo Chen,and Jun Zhao. "Distant supervision for relation extraction via piecewise convolutional neural networks."

Environment settings

We used Python 3.5, Keras and TensorFlow, in Anaconda plataform with Ubuntu 16.04. Keras with Python 3.6 not worked for me.

We recommend the Virtualenv installation.

Before installing Keras, please install one of its backend engines: TensorFlow, Theano, or CNTK. We recommend the TensorFlow backend.

  1. Install TensorFlow
  2. Install Keras

About

Low dimensional CNN (Convolutinal Neural Network) for Relation_Extraction written in Python with Keras

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages