basaktamer/Rotten_Tomatoes_Movie_Reviews
0
Movie Review Sentiment Analysis (Rotten Tomatoes Dataset)
This repository contains an end-to-end Natural Language Processing (NLP) pipeline designed to classify movie review phrases into five distinct sentiment categories. This project was developed as part of a professional data science sprint focused on mastering multiclass classification and neural network deployment.
๐ Project Overview
The goal of this project is to move beyond binary "good/bad" sentiment and capture the nuance of audience reactions. Using the Rotten Tomatoes dataset, the model categorizes text into:
- 0: Negative
- 1: Slightly Negative
- 2: Neutral
- 3: Slightly Positive
- 4: Positive
๐ ๏ธ Technical Stack
- Python 3.10: Primary development environment.
- TensorFlow/Keras: Deep Learning framework used for the Multi-Layer Perceptron (MLP).
- Scikit-Learn: Used for
CountVectorizer(1,2 n-grams) and data preprocessing. - Neattext: Advanced text cleaning to remove noise.
- Streamlit: Web interface for real-time inference.
๐ Repository Structure
app.py: The production-grade Streamlit application script.requirements.txt: Python dependency list for environment replication.movie_sentiment_model.h5: Trained neural network weights.movie_vectorizer.pkl: Pickled Scikit-Learn vectorizer.movie_sentiment_wordclouds.png: Visual insights generated during EDA.
๐ Methodology
The model utilizes a Dense Neural Network with a Softmax output layer. Text is transformed using a 5,000-feature CountVectorizer. The pipeline includes:
- Cleaning: Removal of special characters and case normalization using Neattext.
- Vectorization: Mapping phrases to a high-dimensional sparse matrix.
- Inference: Argmax selection from the 5-neuron output layer.
Developed as part of the "Become a Pro" Data Science Track.
