Advanced sentiment analysis system using state-of-the-art Transformer models to analyze Google Maps reviews.
-
🤖 Multi-Model Transformer Analysis
- Sentiment Analysis (DistilBERT)
- Emotion Detection (RoBERTa)
- Category Classification (BART Zero-Shot)
-
📊 Comprehensive Insights
- Sentiment distribution and scoring
- Emotion detection (joy, anger, sadness, etc.)
- Automatic category classification
- Keyword extraction
- Interactive visualizations
-
💾 Data Management
- CSV export of raw and analyzed data
- Organized file structure
- Easy to integrate with other tools
- Clone the repository:
git clone https://github.com/yourusername/google-reviews-sentiment-analysis.git
cd google-reviews-sentiment-analysis- Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Configure environment:
cp .env.example .env
# Edit .env with your Google Places API key and Place IDRun complete analysis:
python main.py --allOr run individual steps:
python main.py --fetch # Fetch reviews from Google
python main.py --analyze # Analyze with Transformers
python main.py --visualize # Generate visualizationsdata/raw_reviews.csv- Raw reviews from Googledata/analyzed_reviews.csv- Reviews with sentiment analysisvisualizations/sentiment_report.html- Interactive dashboardvisualizations/summary_report.txt- Text summary
- Sentiment: distilbert-base-uncased-finetuned-sst-2-english
- Emotion: j-hartmann/emotion-english-distilroberta-base
- Categories: facebook/bart-large-mnli (zero-shot)
├── config.py # Configuration
├── fetch_reviews.py # Google Places API integration
├── analyze_reviews.py # Transformer analysis
├── visualize_results.py # Visualization generation
├── main.py # Main pipeline
├── data/ # CSV storage
└── visualizations/ # Output reports
- Python 3.8+
- Google Places API key
- GPU recommended (but works on CPU)
MIT License