Sentiment analysis on the Large Movie Review Dataset
In this project, I perform sentiment analysis on a dataset of movie reviews, i.e. predict whether a reivew is positive or negative. I have used pre-trained word2vec embeddings from wikipedia2vec.
Dataset: https://ai.stanford.edu/~amaas/data/sentiment/
Pre-trained embeddings: https://wikipedia2vec.github.io/wikipedia2vec/pretrained/
'The movie was long and left much to be desired.'
Prediction: Negative Sentiment score: 1.94
'the action waS out of the world. And such details to the story line'
Prediction: Positive Sentiment score: 4.47
'even with a star studded cast, the movie lacked in flair. A meaningless plot stretched over 2 hours'
Prediction: Negative Sentiment score: 1.61
-
Run the requirements.txt for 64-bit python installation.
py -m pip install -r requirements.txt
-
Download the dataset and embeddings from the above links and uncompress them.
-
Run Sentiment Analysis.ipynb notebook to prepare the dataset, train the model and save it.
jupyter notebook "Sentiment Analysis.ipynb"