About SentimentStream
Real-time social media sentiment analysis platform
Overview
SentimentStream is a real-time social media sentiment analysis platform that monitors a simulated tweet stream, classifies sentiment using a keyword-based engine, clusters tweets into topics, and detects emerging trends.
No external APIs or machine learning models are required. All sentiment analysis is performed using curated word lists with modifier handling (intensifiers and negations).
20
Tweets Analyzed
5
Topics Detected
200+
Sentiment Keywords
Features
- Live Tweet Stream — Simulated tweets with realistic hashtags, mentions, and varied sentiment
- Keyword-Based Sentiment — Positive/negative/neutral classification with confidence scores
- Topic Clustering — Groups tweets by keyword frequency and co-occurrence
- Trend Detection — Volume spikes, sentiment shifts, and emerging topics
- Custom Text Analysis — Analyze any text for sentiment and extract key topics
- REST API — Full JSON API for programmatic access
Tech Stack
Backend
Python 3.11+, FastAPI, SQLAlchemy
Frontend
Jinja2 Templates, Vanilla JS, CSS3
Database
SQLite
Testing
pytest, httpx
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/tweets | List recent tweets |
| GET | /api/tweets/stream | Get latest batch from stream |
| POST | /api/tweets/generate | Generate new tweets |
| POST | /api/analyze | Analyze custom text |
| GET | /api/sentiment/stats | Aggregate sentiment stats |
| GET | /api/sentiment/history | Sentiment over time |
| GET | /api/topics | List all topics |
| GET | /api/topics/{id} | Topic details |
| POST | /api/topics/cluster | Run topic clustering |
| GET | /api/trends | Current trend data |
| GET | /api/trends/alerts | Alerts |