Projects
NLPFebruary 5, 2026

ML Video Comment Analyzer

Full-stack NLP prototype turning YouTube comments into sentiment, topic, and evidence-backed summaries. I implemented the BERT and BERTopic pipeline, local Ollama summaries, FastAPI backend, Next.js interface, and live SSE progress.

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

FeatureDescription
Comment ExtractionFetch up to 100+ comments per video using yt-dlp
Sentiment AnalysisBERT-powered multilingual classification (positive/negative/neutral/suggestion)
Topic ModelingBERTopic clustering to identify key discussion themes
AI SummariesLocal LLM-powered summaries via Ollama (llama3.2:3b)
Real-time ProgressSSE streaming with live ML metrics during analysis
Multi-Page DashboardDedicated 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

ModelPurpose
nlptown/bert-base-multilingual-uncased-sentimentSentiment classification
all-MiniLM-L6-v2Sentence embeddings for BERTopic
llama3.2:3bAI 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

CategoryTechnologies
FrontendNext.js 15, React 19, TypeScript, Tailwind v4, shadcn/ui
BackendFastAPI, SQLAlchemy, SQLite
ML/AITransformers, BERTopic, Ollama
Extractionyt-dlp
CI/CDGitHub Actions, Ruff, pytest