Skip to content

claree007/Sentiment-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binder

Sentiment Analysis

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/

Sample Output

'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

Setup

  1. Run the requirements.txt for 64-bit python installation.
    py -m pip install -r requirements.txt

  2. Download the dataset and embeddings from the above links and uncompress them.

  3. Run Sentiment Analysis.ipynb notebook to prepare the dataset, train the model and save it.
    jupyter notebook "Sentiment Analysis.ipynb"

About

Sentiment analysis on the IMDB dataset of movie reviews

Resources

Stars

Watchers

Forks

Packages

No packages published