This project analyzes Amazon customer reviews using Natural Language Processing (NLP) techniques in Python. The goal is to identify whether customer reviews express positive, negative, or neutral sentiment and to compare customer ratings with the sentiment detected from review text.
The project uses real-world Amazon review data and demonstrates data analysis, text processing, sentiment classification, and data visualization techniques.
- Analyze customer reviews automatically.
- Classify reviews into Positive, Negative, and Neutral categories.
- Understand customer sentiment from textual feedback.
- Compare customer ratings with review sentiment.
- Generate visual insights from customer review data.
The dataset contains Amazon customer reviews collected from real users.
- Reviewer Name
- Country
- Rating
- Review Title
- Review Text
- Date of Experience
- Total Dataset Available: 21,000+ Reviews
- Reviews Analyzed in this Project: 100
- Python
- Pandas
- TextBlob
- Matplotlib
The Amazon review dataset was loaded into Python using the Pandas library.
Review text data was extracted and prepared for sentiment analysis.
TextBlob was used to calculate sentiment polarity for each review.
- Polarity > 0 → Positive
- Polarity < 0 → Negative
- Polarity = 0 → Neutral
Each review was classified into one of the following categories:
- Positive
- Negative
- Neutral
The number of reviews in each category was calculated.
Customer ratings were compared with detected sentiment to identify patterns and inconsistencies.
A Rating vs Sentiment chart was generated to visualize the relationship between customer ratings and review sentiment.
| Sentiment | Count |
|---|---|
| Negative | 52 |
| Positive | 44 |
| Neutral | 4 |
| Rating | Negative | Neutral | Positive |
|---|---|---|---|
| Rated 1 out of 5 stars | 47 | 3 | 31 |
| Rated 2 out of 5 stars | 4 | 1 | 1 |
| Rated 3 out of 5 stars | 1 | 0 | 1 |
| Rated 4 out of 5 stars | 0 | 0 | 2 |
| Rated 5 out of 5 stars | 0 | 0 | 9 |
Negative reviews slightly outnumbered positive reviews in the analyzed sample.
Most 4-star and 5-star reviews were correctly identified as positive.
Some 1-star reviews were classified as positive because the review text contained positive words even though the overall customer rating was poor.
Text-based sentiment analysis does not always perfectly align with customer ratings.
- Amazon_Reviews.csv
- amazon_test.py
- amazon_sentiment_results.csv
- rating_vs_sentiment.png
- Analyze the complete dataset of 21,000+ reviews.
- Use advanced NLP models for higher accuracy.
- Create additional visualizations.
- Build an interactive dashboard.
- Develop a web-based sentiment analysis application.
This project successfully analyzed Amazon customer reviews using Python and NLP techniques. Reviews were classified into positive, negative, and neutral categories, and meaningful insights were generated by comparing customer ratings with review sentiment.
The project demonstrates practical skills in data analysis, sentiment analysis, text processing, and data visualization using real-world data.
Balaji Nadar
AI & Data Science Intern
Skills Demonstrated:
- Python
- Pandas
- TextBlob
- Matplotlib
- Sentiment Analysis
- Natural Language Processing (NLP)
- Data Analysis
- Data Visualization
