A comprehensive, AI-driven platform for analyzing emotional tone and sentiment across social media platforms. This tool helps brands, organizations, and researchers understand public opinion, detect crises early, and make data-driven decisions.
- Reddit: Posts and comments from relevant subreddits
- YouTube: Video comments analysis
- Web Scraping: Custom data collection from various sources
- Multi-Level Sentiment: Basic (positive/negative/neutral) + Advanced emotions
- VADER + TextBlob: Enhanced sentiment accuracy
- Gemini AI Integration: Context-aware interpretation
- Emotion Detection: Joy, anger, fear, sadness, surprise, disgust
- Track brand sentiment across platforms
- Monitor product launches and campaigns
- Competitive analysis and benchmarking
- Real-time crisis detection with scoring (0-100)
- Automated alerts for negative sentiment spikes
- Early warning system for reputation management
- Customer sentiment analysis
- Product feedback analysis
- Market trend identification
- Marketing campaign effectiveness
- Influencer impact measurement
- ROI analysis through sentiment
- Political sentiment tracking
- Social issue monitoring
- Real-time opinion polls
# Clone the repository
git clone <repository-url>
cd NLP-social media-Sentiment-Analysis-main
# Run setup script
python setup.pyEdit config.py to add your API keys:
# Reddit API (Optional - fallback to web scraping)
REDDIT_CLIENT_ID = "your_client_id"
REDDIT_CLIENT_SECRET = "your_client_secret"python app.pyOpen your browser to: http://localhost:5000
- Query Input: Brand name, product, or any topic
- Platform Selection: Choose Reddit, YouTube
- Analysis Type: Brand monitoring, crisis management, etc.
- Sample Size: 50-500 posts for analysis
- Live Sentiment Tracking: Continuous monitoring
- Crisis Alerts: Automated notifications
- Trend Analysis: Historical sentiment patterns
- Sentiment Distribution: Pie charts showing positive/negative/neutral
- Emotion Analysis: Bar charts for detailed emotions
- Platform Comparison: Cross-platform sentiment analysis
- Crisis Gauge: Risk assessment visualization
- Flask: Web framework
- NLTK + VADER: Sentiment analysis engine
- Gemini AI: Advanced language understanding
- Selenium: Web scraping automation
- Pandas: Data processing and analysis
- Tailwind CSS: Modern responsive design
- JavaScript: Interactive dashboard
- Chart.js/Plotly: Data visualizations
- Font Awesome: Icons and UI elements
- Data Collection: Multi-platform scraping
- Preprocessing: Text cleaning and normalization
- Sentiment Analysis: AI-powered classification
- Emotion Detection: Advanced psychological analysis
- Insights Generation: AI-powered recommendations
- Visualization: Interactive charts and reports
- Compound Score: Overall sentiment (-1 to +1)
- Positive/Negative/Neutral: Percentage distribution
- Subjectivity: Opinion vs. factual content
- Polarity: Emotional intensity
- Joy: Happiness, excitement, delight
- Anger: Frustration, irritation, rage
- Fear: Anxiety, worry, concern
- Sadness: Depression, grief, disappointment
- Surprise: Shock, amazement, wonder
- Disgust: Revulsion, distaste, rejection
- Algorithm: Weighted combination of negative sentiment and anger/fear emotions
- Scale: 0-100 (0 = No risk, 100 = Critical crisis)
- Thresholds:
- 0-30: Low risk (Green)
- 31-70: Medium risk (Orange)
- 71-100: High risk (Red)
Query: "iPhone 15"
Platforms: Reddit
Analysis: Product launch sentiment
Result: 73% positive, Crisis Score: 15/100
Insight: "Highly positive reception, strong market appeal"
Query: "Company XYZ data breach"
Platforms: Reddit, YouTube
Analysis: Crisis detection
Result: 65% negative, Crisis Score: 85/100
Alert: "HIGH CRISIS RISK: Immediate action recommended"
Query: "#BrandCampaign2024"
Platforms: Reddit
Analysis: Marketing campaign effectiveness
Result: 58% positive, High engagement
Insight: "Campaign resonating well with target audience"
- Real-time streaming: WebSocket integration
- Machine Learning: Custom sentiment models
- Geographic Analysis: Location-based sentiment
- Influencer Tracking: Key opinion leader analysis
- Historical Trends: Long-term pattern analysis
- Multi-language Support: Global sentiment analysis
Built with β€οΈ using AI and advanced analytics for better social media understanding.
- Clone the repository
git clone https://github.com/yourusername/movieai-analysis.git
cd movieai-analysis- Set up environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt- Configure API Keys
# Add to .env file
GEMINI_API_KEY=your_api_key_here- Run the application
python app.py- π Python 3.8+
- πΆοΈ Flask web framework
- π§ NLTK for NLP tasks
- π€ Google Gemini API
- π Selenium for web scraping
- π Matplotlib for visualizations
- π¨ TailwindCSS
- π¨ Glass-morphism UI
- π± Responsive design
- π Async JavaScript
- π― Dynamic charts
-
Data Collection π
- Scrapes movie data from Wikipedia
- Falls back to Gemini AI for missing data
- Collects reviews and critical reception
-
Analysis Pipeline π¬
- Performs sentiment analysis on reviews
- Generates sentiment scores and ratings
- Creates visual representations
-
Report Generation π
- Creates detailed PDF reports
- Includes sentiment analysis charts
- Adds AI-generated insights
-
User Interface π¨
- Modern glass-morphism design
- Real-time analysis updates
- Interactive visualizations
The platform provides:
- π Sentiment distribution charts
- π Rating comparisons
- π‘ AI-generated insights
- π Comprehensive reports
# In app.py
SENTIMENT_THRESHOLD = 0.05
MAX_FEATURES = 1000
ANALYSIS_DEPTH = 'deep'/* In style.css */
.glass-effect {
backdrop-filter: blur(8px);
background: rgba(255, 255, 255, 0.1);
}POST /analyze
{
"movie_name": "string",
"analysis_depth": "string",
"include_ai_insights": boolean
}- Fork the repository
- Create your feature branch:
git checkout -b feature/AmazingFeature - Commit your changes:
git commit -m 'Add some AmazingFeature' - Push to the branch:
git push origin feature/AmazingFeature - Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- NLTK team for natural language processing tools
- Google Gemini API for AI insights
- Unsplash for beautiful images
- TailwindCSS for modern styling
- Flask for robust backend framework
Made with β€οΈ by Your Name