Ever scrolled through movie comments and thought,
“Wait... is this person praising the movie or totally roasting it?”
Well, we built a model to find out.
We wanted to build a simple yet powerful sentiment analysis model
that can tell if a movie review is positive or negative — no guessing!
We used a dataset of 50,000 IMDb reviews and trained a deep learning model
to read between the lines and understand the real mood behind the words.
Here’s what’s going on under the hood:
- GloVe word embeddings to capture word meanings.
- A Bidirectional GRU model — because understanding context from both sides of a sentence is 🔑.
- A final Sigmoid layer for binary classification:
PositiveorNegative.
After all the data cleaning, tuning, testing, and a bit of suffering
(thanks, Colab GPU limits), we finally got:
Test Accuracy: 88.7%
Test Loss: 0.2748
And yes, that’s a solid accuracy score — especially for a model we built from scratch,
layer by layer, and refined manually till it hit just right.
- Python 🐍
- TensorFlow & Keras
- GloVe (Global Vectors for Word Representation)
- NLTK
- NumPy & pandas
- Scikit-learn
- Matplotlib (for some cool visualizations)
-
Clone the repo:
git clone https://github.com/Mennaateya/Movie-Comment-Sentiment-Analyzer.git cd Movie-Comment-Sentiment-Analyzer -
Install the requirements:
pip install -r requirements.txt
-
Open the notebook and run the model:
jupyter notebook notebooks/sentiment_model_gru.ipynb
We used a publicly available dataset from Stanford (no worries, you won’t have to download anything yourself — we’ve got you covered).
You'll find the link inside the notebook!
Menna
Marym
Farah
Nada
Basmalla
mennaateya30@gmail.com
marym.ayman.mo@gmail.com
nadawahdan493@gmail.com
- Menna : https://www.linkedin.com/in/menna-ateya/
- Marym : https://www.linkedin.com/in/marym-ayman-43aa0a26b
- Nada :
https://www.linkedin.com/in/nada-wahdan-5227222b1 - basmala : https://www.linkedin.com/in/basmala-essam-67136b326
- farah :
https://www.linkedin.com/in/farah-hazem-69976a22b
MIT License – feel free to use, modify, and share the project. Just give credit where credit is due 🤝