Binary Sentiment Analysis and Emotion Classification using Long Short Term Memory Recurrent Neural Networks (LSTM-RNNS)
Written with Python and Keras, this code tests binary sentiment analysis with LSTM-RNNS which was extended to classify emotions in text. Please note, this code does not run "out of the box". Due to the size of the datasets and individual machine limitations, in order for the code to run you will need to download the desired datasets and word embeddings. With them, you will need to reshape the matrices and tensors to your specific needs. Resources for the word embeddings and datasets are below.
Embeddings:
- Google's Word2Vec URL: https://code.google.com/archive/p/word2vec/
Datasets:
-
Keras IMDB Dataset URL: https://keras.io/datasets/
-
Amazon Product Reviews URL: www.kaggle.com/bittlingmayer/amazonreviews
-
Figure Eight's Emotion in Text Dataset: URL: https://www.figure-eight.com/data-for-everyone/