houqp / sentiment-analysis-template

Build a deep learning model for sentiment analysis of IMDB reviews

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sentiment-analysis-template

Sentiment analysis is one of the most common NLP problems. The goal is to analyze a text and predict whether the underlying sentiment is positive, negative or neutral. What can you use it for? Here are a few ideas - measure sentiment of customer support tickets, survey responses, social media, and movie reviews!

Predicting sentiment of movie reviews

In this notebook we will build a Convolutional Neural Network (CNN) classifier to predict the sentiment (positive or negative) of movie reviews.

sentiment

We will use the Stanford Large Movie Reviews dataset for training our model. The dataset is compiled from a collection of 50,000 reviews from IMDB. It contains an equal number of positive and negative reviews. The authors considered only highly polarized reviews. Negative reviews have scores ≤ 4 (out of 10), while positive reviews have score ≥ 7. Neutral reviews are not included. The dataset is divided evenly into training and test sets.

We will:

  • Preprocess text data for NLP
  • Build and train a 1-D CNN using Keras and Tensorflow
  • Evaluate our model on the test set
  • Run the model on your own movie reviews!

About

Build a deep learning model for sentiment analysis of IMDB reviews


Languages

Language:Jupyter Notebook 96.9%Language:Python 3.1%