Skip to content

Simple implementation of CNN for Sentiment Classification (Pos/Neg) in Tensorflow.

Notifications You must be signed in to change notification settings

jeffrey1hu/cnn-sentiment-analysis-tf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cnn-text-sentiment-analysis-tf

In this project we will implement a movie rating Sentiment (Positive/Negative) Classifier with CNN using TensorFlow.

Note

Dataset

The existing data set is the Moive review data from Rotten Tomatoes which is pretty small but convenient to tune the model under CPUs. The adaption of other dataset (such as SST) is under development.

requirements

  • Python 2.7
  • Tensorflow 1.3.0
  • Numpy

Basic Usage

  • Set the hyper-parameters in config.py.
  • Then run with existing dataset
python train.py

TO DO

  • add BiLSTM baseline model
  • add TensorBoard visualization
  • add learning rate exponential decay to enhence generalization
  • Initialize the embeddings with pre-trained word vectors (word2vec, glove)
  • some way to prevent overfitting (l2 regularization, increase dropout rate..)
  • add interactive evaluation

References

About

Simple implementation of CNN for Sentiment Classification (Pos/Neg) in Tensorflow.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages