Awesome Open Source
Awesome Open Source


Sentiment Analysis of Twitter data using a combined CNN-LSTM Neural Network model


This project seeks to extend the work we did previously on sentiment analysis using simple Feed-Foward Neural Networks (Found here: paper & repo). Instead, we wish to experiment with building a combined CNN-LSTM Neural Net model using Tensorflow to perform sentiment analysis on Twitter data.


sudo -H pip install -r requirements.txt

Run the Code

  • On change the variable MODEL_TO_RUN = {0 or 1}
    • 0 = CNN-LSTM
    • 1 = LSTM-CNN
  • Feel free to change other variables (batch_size, filter_size, etc...)
  • Run python (or, with proper permissions, ./

Code Structure

  • : Contains the LSTM_CNN Model class to be instantiated.
  • : Contains the CNN_LSTM Model class to be instantiated.
  • : Main runner for the code. It instantiates a model, trains it and validates it.
  • : Contains a couple of functions needed to pre-process and tokenize the dataset.
Alternatives To Cs291k
Select To Compare

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (809,126
Machine Learning (37,207
Deep Learning (36,582
Tensorflow (22,362
Neural (16,724
Neural Network (15,534
Convolutional Neural Networks (12,528
Sentiment (6,177
Lstm (5,536
Sentiment Analysis (3,258