All Projects → roomylee → Rcnn Text Classification

roomylee / Rcnn Text Classification

Tensorflow Implementation of "Recurrent Convolutional Neural Network for Text Classification" (AAAI 2015)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Rcnn Text Classification

Rmdl
RMDL: Random Multimodel Deep Learning for Classification
Stars: ✭ 375 (+195.28%)
Mutual labels:  convolutional-neural-networks, text-classification, recurrent-neural-networks
overview-and-benchmark-of-traditional-and-deep-learning-models-in-text-classification
NLP tutorial
Stars: ✭ 41 (-67.72%)
Mutual labels:  sentiment-analysis, text-classification, recurrent-neural-networks
Text classification
Text Classification Algorithms: A Survey
Stars: ✭ 1,276 (+904.72%)
Mutual labels:  convolutional-neural-networks, text-classification, recurrent-neural-networks
Rnn Text Classification Tf
Tensorflow Implementation of Recurrent Neural Network (Vanilla, LSTM, GRU) for Text Classification
Stars: ✭ 114 (-10.24%)
Mutual labels:  text-classification, sentiment-analysis, recurrent-neural-networks
Rcnn Relation Extraction
Tensorflow Implementation of Recurrent Convolutional Neural Network for Relation Extraction
Stars: ✭ 64 (-49.61%)
Mutual labels:  convolutional-neural-networks, recurrent-neural-networks, rcnn
Text Classification Models Pytorch
Implementation of State-of-the-art Text Classification Models in Pytorch
Stars: ✭ 379 (+198.43%)
Mutual labels:  convolutional-neural-networks, recurrent-neural-networks, rcnn
Hdltex
HDLTex: Hierarchical Deep Learning for Text Classification
Stars: ✭ 191 (+50.39%)
Mutual labels:  convolutional-neural-networks, text-classification, recurrent-neural-networks
Textclassifier
Text classifier for Hierarchical Attention Networks for Document Classification
Stars: ✭ 985 (+675.59%)
Mutual labels:  convolutional-neural-networks, text-classification, recurrent-neural-networks
Deep Atrous Cnn Sentiment
Deep-Atrous-CNN-Text-Network: End-to-end word level model for sentiment analysis and other text classifications
Stars: ✭ 64 (-49.61%)
Mutual labels:  convolutional-neural-networks, text-classification, sentiment-analysis
Context
ConText v4: Neural networks for text categorization
Stars: ✭ 120 (-5.51%)
Mutual labels:  convolutional-neural-networks, text-classification, sentiment-analysis
Cluedatasetsearch
搜索所有中文NLP数据集,附常用英文NLP数据集
Stars: ✭ 2,112 (+1562.99%)
Mutual labels:  text-classification, sentiment-analysis
Emnist
A project designed to explore CNN and the effectiveness of RCNN on classifying the EMNIST dataset.
Stars: ✭ 81 (-36.22%)
Mutual labels:  convolutional-neural-networks, recurrent-neural-networks
Hierarchical Attention Networks
TensorFlow implementation of the paper "Hierarchical Attention Networks for Document Classification"
Stars: ✭ 75 (-40.94%)
Mutual labels:  text-classification, sentiment-analysis
Tnn
Biologically-realistic recurrent convolutional neural networks
Stars: ✭ 83 (-34.65%)
Mutual labels:  convolutional-neural-networks, recurrent-neural-networks
Malware Classification
Towards Building an Intelligent Anti-Malware System: A Deep Learning Approach using Support Vector Machine for Malware Classification
Stars: ✭ 88 (-30.71%)
Mutual labels:  convolutional-neural-networks, recurrent-neural-networks
Sarcasm Detection
Detecting Sarcasm on Twitter using both traditonal machine learning and deep learning techniques.
Stars: ✭ 73 (-42.52%)
Mutual labels:  text-classification, sentiment-analysis
Kerasr
R interface to the keras library
Stars: ✭ 90 (-29.13%)
Mutual labels:  convolutional-neural-networks, recurrent-neural-networks
Doc2vec
📓 Long(er) text representation and classification using Doc2Vec embeddings
Stars: ✭ 92 (-27.56%)
Mutual labels:  text-classification, sentiment-analysis
Recurrent Environment Simulators
Deepmind Recurrent Environment Simulators paper implementation in tensorflow
Stars: ✭ 73 (-42.52%)
Mutual labels:  convolutional-neural-networks, recurrent-neural-networks
Deep Learning For Beginners
videos, lectures, blogs for Deep Learning
Stars: ✭ 89 (-29.92%)
Mutual labels:  convolutional-neural-networks, recurrent-neural-networks

Recurrent Convolutional Neural Network for Text Classification

Tensorflow implementation of "Recurrent Convolutional Neural Network for Text Classification".

rcnn

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.

Implementation of Recurrent Structure

recurrent_structure

  • Bidirectional RNN (Bi-RNN) is used to implement the left and right context vectors.
  • Each context vector is created by shifting the output of Bi-RNN and concatenating a zero state indicating the start of the context.

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:

     $ 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"
    

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"
    

Result

  • Comparision between Recurrent Convolutional Neural Network and Convolutional Neural Network.
  • dennybritz's cnn-text-classification-tf is used for compared CNN model.
  • Same pre-trained word2vec used for both models.

Accuracy for validation set

accuracy

Loss for validation set

accuracy

Reference

  • Recurrent Convolutional Neural Network for Text Classification (AAAI 2015), S Lai et al. [paper]
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].