CoolFace
Apppublic

basaktamer/Rotten_Tomatoes_Movie_Reviews

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

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:

  1. 1.Cleaning: Removal of special characters and case normalization using Neattext.
  2. 2.Vectorization: Mapping phrases to a high-dimensional sparse matrix.
  3. 3.Inference: Argmax selection from the 5-neuron output layer.

Developed as part of the "Become a Pro" Data Science Track.