This project applies Natural Language Processing (NLP) techniques to classify customer reviews from Amazon and a product's official site into Positive, Negative, or Neutral sentiments. It uses both traditional NLP methods and transformer-based deep learning models for comparison.
- Clean and preprocess customer reviews using NLP techniques.
- Analyze and classify review sentiments using:
- VADER (Lexicon-Based)
- TextBlob
- RoBERTa (Transformer-Based)
- BERT
- Evaluate model performance using source ratings for validation.
- Languages: Python
- Libraries:
- NLP:
nltk
,textblob
,vaderSentiment
,transformers
- ML:
scikit-learn
- Data Handling:
pandas
,numpy
- Visualization:
matplotlib
,seaborn
- NLP:
Model | Type | Highlights |
---|---|---|
VADER | Lexicon-based | Best for social media-like text |
TextBlob | Rule-based | Quick and lightweight sentiment analyzer |
BERT | Transformer-based | Pre-trained language model from Google |
RoBERTa | Transformer-based | Improved variant of BERT by Facebook |
- Lowercasing and text cleaning
- Tokenization and lemmatization
- Stopwords removal
- Vectorization (TF-IDF and transformer tokenization)
Sentiment predictions were cross-validated using actual star ratings to measure accuracy.
π RoBERTa achieved the highest performance among all models.
- Clone the repository:
git clone https://github.com/ShwetaPardhi0/Sentiment-Analysis-nlp.git cd Sentiment-Analysis-nlp