Portfolio Project Data Science NLP Marketing & E-commerce
Real-time sentiment analysis system for brand feedback on Amazon, Zomato, and Swiggy reviews. Demonstrates end-to-end unstructured data mastery using rule-based (VADER), deep learning (BERT), and unsupervised (LDA) NLP techniques.
| Feature | Description |
|---|---|
| ๐ EDA | Review length, rating distribution, top n-grams, word clouds |
| ๐ VADER | Rule-based sentiment, instant, no training needed |
| ๐ค BERT | HuggingFace twitter-roberta-base-sentiment, ~500MB download |
| ๐ LDA | Topic modeling (Gensim), coherence evaluation, pyLDAvis HTML |
| ๐ฅ๏ธ Dashboard | Streamlit app โ live demo + full analytics |
SentimentAnalysis/
โโโ data/
โ โโโ raw/ โ reviews.csv (1200 synthetic reviews)
โ โโโ processed/ โ cleaned data, model outputs
โโโ notebooks/
โ โโโ 01_EDA.ipynb
โ โโโ 02_Sentiment_Analysis.ipynb
โ โโโ 03_Topic_Modeling.ipynb
โโโ src/
โ โโโ preprocess.py โ text cleaning pipeline
โ โโโ vader_analysis.py โ VADER sentiment
โ โโโ bert_analysis.py โ BERT deep learning
โ โโโ topic_modeling.py โ LDA topic modeling
โโโ app/
โ โโโ dashboard.py โ Streamlit dashboard
โโโ outputs/
โ โโโ figures/ โ auto-generated charts
โ โโโ reports/ โ interactive LDA HTML
โโโ run_all.py โ one-click quick start
โโโ requirements.txt
pip install -r requirements.txt
python -m spacy download en_core_web_sm
Note: BERT requires PyTorch. On CPU this works fine. For GPU, install CUDA-compatible torch from https://pytorch.org
python run_all.py
This will:
http://localhost:8501# Generate dataset
python data/raw/generate_dataset.py
# Preprocess text
python src/preprocess.py
# VADER analysis (fast, no download)
python src/vader_analysis.py
# BERT analysis (downloads ~500MB model first time)
python src/bert_analysis.py
# LDA topic modeling
python src/topic_modeling.py
# Launch dashboard
streamlit run app/dashboard.py
jupyter notebook
# Open notebooks/ and run them in order: 01 โ 02 โ 03
outputs/reports/lda_topics.html)| Model | Accuracy | Speed | GPU Required |
|---|---|---|---|
| VADER | ~72% | โก Instant | โ No |
| BERT | ~87% | ๐ Slower | Recommended |
Python ยท pandas ยท NLTK ยท spaCy ยท vaderSentiment ยท HuggingFace Transformers ยท PyTorch ยท Gensim ยท pyLDAvis ยท scikit-learn ยท Streamlit ยท Plotly ยท WordCloud ยท Matplotlib ยท Seaborn
This project applies directly to:
Built as a Data Science portfolio project demonstrating real-world NLP capabilities.