Skip to content

Repository files navigation

youtube-sentiment-analysis

This project aims to analyze the sentiment of YouTube video comments using a pre-trained BERT model and KMeans clustering. The analysis includes visualization of sentiment distributions and clustering results.

Installation

  1. Clone the repository:
git clone https://github.com/BozhengLong/youtube-sentiment-analysis.git
cd youtube-sentiment-analysis
  1. Create and activate a virtual or conda environment:
conda create --n myenv
conda activate myenv
  1. Install the required packages:
pip install -r requirements.txt

Usage

  1. Load and initialize the BERT model:

Modify the API_KEY and VIDEO_ID in comment_sentiment_analysis.py with your own YouTube API key and video ID.

  1. Run the sentiment analysis:
python comment_sentiment_analysis.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages