Problem Statement
1. Problem Overview
The objective of this project is to develop a Sentiment Analysis system for movie reviews utilizing pretrained static word embeddings paired with machine learning classification models. This approach bridges the gap between traditional feature engineering and deep learning by embedding semantic properties into low-dimensional dense vectors. Given the constrained execution environment, the main focus is on feature extraction and representation alignment - specifically, how to effectively aggregate word-level vectors into structural document-level features to accurately classify user-generated text.
2. Training Data
The dataset consists of highly polarized movie reviews scraped from the IMDB website, containing the following main components:
- Text: The raw movie review written by the user (string format).
- Label (Target): The binary sentiment classification where `0` represents a negative review (human rating <= 4/10) and `1` represents a positive review (human rating >= 7/10). Note: Neutral reviews (ratings 5/10 and 6/10) are excluded to ensure an unambiguous classification task.
- Directory Labels: The parent folder name (pos or neg) defines the ground-truth sentiment.
- File Naming: Files use the format `[id]_[rating].txt` (e.g., `5_8.txt` signifies ID 5 with a rating of 8/10, located in the pos folder).
- Unlabeled: `[id]_0.txt` (Rating 0). These are located in the 'unsup' folder, intended for unsupervised or semi-supervised learning tasks.
3. Problem Requirements
- Input: A raw text string representing a movie review.
- Output: A binary label (`0` or `1`) representing the predicted sentiment of the review.
- Available packages: Default Google Colab packages, SpaCy's `en_core_web_sm` model, and the following pretrained embeddings accessible via `gensim`: `glove-twitter-50` and `glove-wiki-gigaword-50`.
- Internet access: Completely Offline - you should not upload any files from your local computer or download from the Internet. The requested embeddings are pre-cached locally within the sample notebook.
4. Evaluation Metrics
The model's performance is evaluated based on its classification effectiveness on unseen test data:
- F1-Score: The harmonic mean of Precision and Recall. This is the sole evaluation metric, indicating the model's balance between minimizing false positives and false negatives across both sentiment classes.
(Maas, A. (2019). Large Movie Review Dataset (IMDB) — Andrew Maas. Stanford.edu. https://ai.stanford.edu/~amaas/data/sentiment/?fbclid=IwY2xjawSWUS5leHRuA2FlbQIxMQBzcnRjBmFwcF9pZAEwAAEei6RGu6GPJkn-xvjSKm2r3sZEn_l7-ohJ6K2TtuLp9aZEwD-szUKbiqxhllU_aem_-TLQhZ5grXuQa5On8ZUxjg)