Overview
AI Video Comment Analyzer is a full-stack application that extracts YouTube video comments and performs ML-powered analysis including sentiment classification, topic modeling, and AI-generated summaries. The tool helps content creators and researchers understand audience feedback through actionable insights.
Key Features
| Feature | Description |
|---|---|
| Comment Extraction | Fetch up to 100+ comments per video using yt-dlp |
| Sentiment Analysis | BERT-powered multilingual classification (positive/negative/neutral/suggestion) |
| Topic Modeling | BERTopic clustering to identify key discussion themes |
| AI Summaries | Local LLM-powered summaries via Ollama (llama3.2:3b) |
| Real-time Progress | SSE streaming with live ML metrics during analysis |
| Multi-Page Dashboard | Dedicated pages for Overview, Charts, Topics, and Comments |
Analysis Pipeline
The ML pipeline processes comments through several stages:
- Extraction - yt-dlp fetches comments with metadata (likes, replies, timestamps)
- Sentiment Analysis - BERT model classifies each comment with confidence scores
- Topic Modeling - BERTopic clusters similar comments into themes
- Summarization - Ollama generates actionable summaries per sentiment category
Dashboard Pages
Overview
- At-a-glance sentiment breakdown with net tone indicator
- Evidence strip showing top comments by engagement
- Structured summary cards with themes, evidence, and actions
Charts
- Sentiment distribution pie chart
- Engagement by sentiment bar chart
- Topic bubble visualization
- ML confidence histogram
Topics
- Topic list grouped by sentiment with comment counts
- Detail panel with keywords and related comments
- Sentiment filter bar for focused exploration
Comments
- Full comment list with topic pills
- Sort by likes, confidence, or recency
- Sentiment word highlighting
Technical Stack
Frontend
- Next.js 15 - React 19 with App Router
- TypeScript - Type-safe development
- Tailwind CSS v4 - Utility-first styling with custom design system
- shadcn/ui - Accessible UI components
- Recharts - Data visualization
Backend
- FastAPI - High-performance Python API
- SQLAlchemy - ORM with SQLite database
- yt-dlp - YouTube comment extraction
- Transformers - BERT sentiment model
- BERTopic - Topic modeling with UMAP + HDBSCAN
- Ollama - Local LLM inference
ML Models
| Model | Purpose |
|---|---|
| nlptown/bert-base-multilingual-uncased-sentiment | Sentiment classification |
| all-MiniLM-L6-v2 | Sentence embeddings for BERTopic |
| llama3.2:3b | AI summary generation |
DevOps
- GitHub Actions - CI/CD with lint, format, and test checks
- Ruff - Python linting and formatting
- pytest - Backend testing with 65% coverage threshold
- ESLint - Frontend code quality
Technologies Summary
| Category | Technologies |
|---|---|
| Frontend | Next.js 15, React 19, TypeScript, Tailwind v4, shadcn/ui |
| Backend | FastAPI, SQLAlchemy, SQLite |
| ML/AI | Transformers, BERTopic, Ollama |
| Extraction | yt-dlp |
| CI/CD | GitHub Actions, Ruff, pytest |
