GithubHelp home page GithubHelp logo

dlh_finalproject's Introduction

DLH Final Project Team 82 - [email protected], [email protected]

Citation to the original paper

Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification (Zhou et al., ACL 2016)

Peng Zhou, Wei Shi, Jun Tian, Zhenyu Qi, Bingchen Li, Hongwei Hao, and Bo Xu. 2016. Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 207โ€“212, Berlin, Germany. Association for Computational Linguistics.

Link to the code repository

We used an open-source implementation of the aforemnetioned paper that can be found at this link.

The original README for this repository can be found at the end of this file.

Dependencies

  1. Create a python virtual environment in this directory
  2. Install dependencies using:
pip3 install -r requirements.txt

Data download instruction

This repository includes the data used in our experiment in the concept_assertion_relation_training_data folder.

The data can also be obtained from the Harvard Department of Medical Informatics n2c2 research portal.

Preprocessing code + command

The pre-processing code lives in the data_formatting.py file. To pre-process out data, run:

python3 data_formatting.py

Training code + Evaluation code command

Our training and evaluation code lives in the train.py file. The hyperparameters associated with the training can be modified in the get_args.py file. By default, our training model runs for 25 epochs and print the following statistics in the console:

  • Loss
  • Accuracy
  • F-1 scores for each label
  • Recall scores for each label
  • Precision scores for each label

Training can be run using the following command:

python3 train.py

Table of results

We used a 70-30 split on our dataset for our train-test split. We used a random word embedding for our sentences and used the following hyperparameters:

  • embedding dimension - 100
  • LSTM combine - 'add'
  • embbeding dropout - 0.5

We achieved the following results:

Results


[Original GitHub README]

(Pytorch) Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification

Pytorch implementation of ACL 2016 paper, Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification (Zhou et al., 2016)

Reference

dlh_finalproject's People

Contributors

kmullapudi-11 avatar

Watchers

 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.