Skip to content

analyzes sentiment in YouTube video comments using the YouTube Data API and a pre-trained model. It fetches comments, performs sentiment analysis, and visualizes the results on a web interface.

Notifications You must be signed in to change notification settings

machphy/youtube_sentiment_analysis_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Sentiment Analysis 😊😐😔😡

YouTube Sentiment Analysis

About

A web application that performs sentiment analysis on YouTube video comments. The application uses the YouTube Data API to fetch comments and then analyzes their sentiment using a pre-trained model. Results are visualized and displayed on a web interface.

Sentiment Analysis is a popular application of Natural Language Processing (NLP). This project focuses on analyzing YouTube comments to understand the sentiments expressed by viewers.


Live Link

Hosted on GitHub Pages


Project Specifications

Below are the libraries and frameworks used to create the project:

  • Web Framework: Flask
  • Visualization: Matplotlib
  • Sentiment Analysis Libraries: TensorFlow/Keras
  • API Requests: requests

Project Components

The project currently includes:

  1. Comment Analysis - Fetches comments from a YouTube video using the YouTube Data API and analyzes their sentiment.
  2. Visualization - Displays sentiment distribution and insights using charts.

Screenshots

Application Interface

Screenshot 2024-07-26 185950

Sentiment Analysis Results

Screenshot 2024-07-26 190011



Important Information

YouTube Data API

API documentation link - YouTube Data API Documentation


To work with the API, you need to create an API key. To create an API key, register on the Google Cloud Console and a unique key will be generated for you. Use this key to make successful API requests.

Note: Ensure your API key is kept secure and adhere to usage limits.


API Specifications

To fetch comments, the application performs the following API calls:

  1. Fetch Comments - Retrieve comments for a YouTube video using the YouTube Data API.
  2. Analyze Sentiment - Process the comments and analyze their sentiment.

API Endpoint for Comments - https://www.googleapis.com/youtube/v3/commentThreads?part=snippet&videoId={videoId}&key={apiKey}


Models Used

The project uses pre-trained models for sentiment analysis. Here’s a brief overview of the tools used:

  • TensorFlow/Keras - Libraries for building and using machine learning models for sentiment analysis.

Note:

  1. The sentiment analysis model classifies comments into sentiment categories (POSITIVE🙂, NEGATIVE☹️, NEUTRAL😐).

Project Development Ideas

Future enhancements may include:

  • Analyzing comments in different languages.
  • Integrating with other social media platforms.
  • Enhancing visualizations with interactive charts.

Thank You!

Thank you for exploring the project. I hope you find it useful.

If you did, please consider giving a star⭐ to this repository. It would mean a lot!



© 2024 Rajeev Sharma | [email protected]

About

analyzes sentiment in YouTube video comments using the YouTube Data API and a pre-trained model. It fetches comments, performs sentiment analysis, and visualizes the results on a web interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published