All Projects → roomylee → Rnn Text Classification Tf

roomylee / Rnn Text Classification Tf

Licence: mit
Tensorflow Implementation of Recurrent Neural Network (Vanilla, LSTM, GRU) for Text Classification

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Rnn Text Classification Tf

Tensorflow Sentiment Analysis On Amazon Reviews Data
Implementing different RNN models (LSTM,GRU) & Convolution models (Conv1D, Conv2D) on a subset of Amazon Reviews data with TensorFlow on Python 3. A sentiment analysis project.
Stars: ✭ 34 (-70.18%)
Mutual labels:  lstm, text-classification, sentiment-analysis, gru
Pytorch Sentiment Analysis
Tutorials on getting started with PyTorch and TorchText for sentiment analysis.
Stars: ✭ 3,209 (+2714.91%)
Mutual labels:  lstm, sentiment-analysis, recurrent-neural-networks
Rnn ctc
Recurrent Neural Network and Long Short Term Memory (LSTM) with Connectionist Temporal Classification implemented in Theano. Includes a Toy training example.
Stars: ✭ 220 (+92.98%)
Mutual labels:  lstm, recurrent-neural-networks, gru
automatic-personality-prediction
[AAAI 2020] Modeling Personality with Attentive Networks and Contextual Embeddings
Stars: ✭ 43 (-62.28%)
Mutual labels:  text-classification, recurrent-neural-networks, lstm
Context
ConText v4: Neural networks for text categorization
Stars: ✭ 120 (+5.26%)
Mutual labels:  lstm, text-classification, sentiment-analysis
Pytorch Kaldi
pytorch-kaldi is a project for developing state-of-the-art DNN/RNN hybrid speech recognition systems. The DNN part is managed by pytorch, while feature extraction, label computation, and decoding are performed with the kaldi toolkit.
Stars: ✭ 2,097 (+1739.47%)
Mutual labels:  lstm, recurrent-neural-networks, gru
sarcasm-detection-for-sentiment-analysis
Sarcasm Detection for Sentiment Analysis
Stars: ✭ 21 (-81.58%)
Mutual labels:  sentiment-analysis, text-classification, lstm
Document Classifier Lstm
A bidirectional LSTM with attention for multiclass/multilabel text classification.
Stars: ✭ 136 (+19.3%)
Mutual labels:  lstm, text-classification, recurrent-neural-networks
Tensorflow Lstm Sin
TensorFlow 1.3 experiment with LSTM (and GRU) RNNs for sine prediction
Stars: ✭ 52 (-54.39%)
Mutual labels:  lstm, recurrent-neural-networks, gru
Text Classification Keras
📚 Text classification library with Keras
Stars: ✭ 53 (-53.51%)
Mutual labels:  lstm, text-classification, sentiment-analysis
Rcnn Text Classification
Tensorflow Implementation of "Recurrent Convolutional Neural Network for Text Classification" (AAAI 2015)
Stars: ✭ 127 (+11.4%)
Mutual labels:  text-classification, sentiment-analysis, recurrent-neural-networks
Gdax Orderbook Ml
Application of machine learning to the Coinbase (GDAX) orderbook
Stars: ✭ 60 (-47.37%)
Mutual labels:  lstm, recurrent-neural-networks, gru
overview-and-benchmark-of-traditional-and-deep-learning-models-in-text-classification
NLP tutorial
Stars: ✭ 41 (-64.04%)
Mutual labels:  sentiment-analysis, text-classification, recurrent-neural-networks
dts
A Keras library for multi-step time-series forecasting.
Stars: ✭ 130 (+14.04%)
Mutual labels:  recurrent-neural-networks, lstm, gru
Sentiment Analysis Nltk Ml Lstm
Sentiment Analysis on the First Republic Party debate in 2016 based on Python,NLTK and ML.
Stars: ✭ 61 (-46.49%)
Mutual labels:  lstm, sentiment-analysis, recurrent-neural-networks
Pytorch Rnn Text Classification
Word Embedding + LSTM + FC
Stars: ✭ 112 (-1.75%)
Mutual labels:  lstm, text-classification, gru
Sarcasm Detection
Detecting Sarcasm on Twitter using both traditonal machine learning and deep learning techniques.
Stars: ✭ 73 (-35.96%)
Mutual labels:  text-classification, sentiment-analysis
Lstm Ctc Ocr
using rnn (lstm or gru) and ctc to convert line image into text, based on torch7 and warp-ctc
Stars: ✭ 70 (-38.6%)
Mutual labels:  lstm, recurrent-neural-networks
Hierarchical Attention Networks
TensorFlow implementation of the paper "Hierarchical Attention Networks for Document Classification"
Stars: ✭ 75 (-34.21%)
Mutual labels:  text-classification, sentiment-analysis
Dialogue Understanding
This repository contains PyTorch implementation for the baseline models from the paper Utterance-level Dialogue Understanding: An Empirical Study
Stars: ✭ 77 (-32.46%)
Mutual labels:  lstm, sentiment-analysis

Recurrent Neural Network for Text Calssification

Tensorflow implementation of RNN(Recurrent Neural Network) for sentiment analysis, one of the text classification problems. There are three types of RNN models, 1) Vanilla RNN, 2) Long Short-Term Memory RNN and 3) Gated Recurrent Unit RNN.

rnn

Data: Movie Review

  • Movie reviews with one sentence per review. Classification involves detecting positive/negative reviews (Pang and Lee, 2005)
  • Download "sentence polarity dataset v1.0" at the Official Download Page
  • Located in "data/rt-polaritydata/" in my repository
  • rt-polarity.pos contains 5331 positive snippets
  • rt-polarity.neg contains 5331 negative snippets

Usage

Train

  • positive data is located in "data/rt-polaritydata/rt-polarity.pos"

  • negative data is located in "data/rt-polaritydata/rt-polarity.neg"

  • "GoogleNews-vectors-negative300" is used as pre-trained word2vec model

  • Display help message:

     $ python train.py --help
    
  • Train Example:

    1. Vanilla RNN

    vanilla

     $ python train.py --cell_type "vanilla" \
     --pos_dir "data/rt-polaritydata/rt-polarity.pos" \
     --neg_dir "data/rt-polaritydata/rt-polarity.neg"\
     --word2vec "GoogleNews-vectors-negative300.bin"
    

    2. Long Short-Term Memory (LSTM) RNN

    lstm

     $ python train.py --cell_type "lstm" \
     --pos_dir "data/rt-polaritydata/rt-polarity.pos" \
     --neg_dir "data/rt-polaritydata/rt-polarity.neg"\
     --word2vec "GoogleNews-vectors-negative300.bin"
    

    3. Gated Reccurrent Unit (GRU) RNN

    gru

     $ python train.py --cell_type "gru" \
     --pos_dir "data/rt-polaritydata/rt-polarity.pos" \
     --neg_dir "data/rt-polaritydata/rt-polarity.neg"\
     --word2vec "GoogleNews-vectors-negative300.bin"
    

Evalutation

  • Movie Review dataset has no test data.

  • If you want to evaluate, you should make test dataset from train data or do cross validation. However, cross validation is not implemented in my project.

  • The bellow example just use full rt-polarity dataset same the train dataset

  • Evaluation Example:

     $ python eval.py \
     --pos_dir "data/rt-polaritydata/rt-polarity.pos" \
     --neg_dir "data/rt-polaritydata/rt-polarity.neg" \
     --checkpoint_dir "runs/1523902663/checkpoints"
    

Reference

  • Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales (ACL 2005), B Pong et al. [paper]
  • Long short-term memory (Neural Computation 1997), J Schmidhuber et al. [paper]
  • Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation (EMNLP 2014), K Cho et al. [paper]
  • Understanding LSTM Networks [blog]
  • RECURRENT NEURAL NETWORKS (RNN) – PART 2: TEXT CLASSIFICATION [blog]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].