Coder Social home page Coder Social logo

yzheng001 / treelstmsentiment Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ttpro1995/treelstmsentiment

0.0 0.0 0.0 23 KB

Pytorch implementation of Sentiment Classification in Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks

License: MIT License

Python 81.89% Shell 0.30% Java 17.81%

treelstmsentiment's Introduction

Tree-Structured Long Short-Term Memory Networks

A PyTorch based implementation of Tree-LSTM from Kai Sheng Tai's paper Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks.

Requirements

  • PyTorch Deep learning library
  • tqdm: display progress bar
  • meowlogtool: a logger that write everything on console to file
  • Java >= 8 (for Stanford CoreNLP utilities)
  • Python >= 3

Usage

First run the script ./fetch_and_preprocess.sh

This downloads the following data:

and the following libraries:

Sentiment classification

python sentiment.py --name <name_of_log_file> --model_name <constituency|dependency> --epochs 10

We have not fully test on fine grain classification yet. Binary classification accuracy on both model are the same in original paper.

Acknowledgements

Kai Sheng Tai for the original LuaTorch implementation
Pytorch team for Python library
Riddhiman Dasgupta for his implement on sentiment relatedness https://github.com/dasguptar/treelstm.pytorch which I based on as starter code.

License

MIT

treelstmsentiment's People

Contributors

ttpro1995 avatar dalinvip 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.