Skip to content

YouTube Comment Sentiment Analyzer is a Python-based web application that analyzes the sentiment of comments from any YouTube video. It uses the YouTube Data API to fetch comments, processes them using the VaderSentiment library, and displays the result as a bar graph showing positive, negative, and neutral sentiments.

Notifications You must be signed in to change notification settings

SSonikaa/YouTube-Comment-Sentiment-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 YouTube Comment Sentiment Analyzer

This Python-based web app performs sentiment analysis on YouTube video comments using natural language processing. It classifies comments into Positive, Negative, or Neutral and visualizes the results in a bar chart.

The project fetches comments using the YouTube Data API, processes them with sentiment analysis (using VaderSentiment), and renders a clean graph in a Flask-powered web interface.

🧠 Features

  • 🔍 Fetches real YouTube video comments using API
  • 📊 Analyzes sentiment (Positive, Negative, Neutral)
  • 📈 Displays the result in a matplotlib bar chart
  • 💻 Web app built using Flask

📸 Snapshot

![_20250130_065558](https://github.com/user-attachments/assets/0edca664-a496-410c-b4ea-8ef993dec220) ![_20250130_065610](https://github.com/user-attachments/assets/aa6b2e1d-c765-4faa-ac39-b3079b82123a)

🔁 Steps to Replicate

  1. Create your API key for YouTube from: https://developers.google.com
  2. Download and install Conda: https://docs.conda.io
  3. Create a virtual environment and install required packages:
    conda create -n yt-sentiment python=3.9
    conda activate yt-sentiment
    pip install flask google-api-python-client emoji vaderSentiment matplotlib
  4. Run the app:
    python app.py
  5. Open http://127.0.0.1:5000 in your browser to use the application.

📂 Project Structure

youtube-sentiment-analyzer/
├── app.py
├── templates/
│   └── index.html
├── static/
│   └── style.css (optional)
└── README.html

🧪 Technologies Used

  • Python
  • Flask
  • Google API Client
  • VaderSentiment
  • Matplotlib
  • HTML/CSS (Frontend)

🙌 Credits

Built by Sonika
APIs powered by Google YouTube Data API

View the running project here : https://www.linkedin.com/posts/ssonikaa_datascience-python-flask-activity-7197236724547166208-SAlz?utm_source=share&utm_medium=member_desktop

About

YouTube Comment Sentiment Analyzer is a Python-based web application that analyzes the sentiment of comments from any YouTube video. It uses the YouTube Data API to fetch comments, processes them using the VaderSentiment library, and displays the result as a bar graph showing positive, negative, and neutral sentiments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published