/Youtube-Sentiment-Analysis

Sentiment Analysis on YouTube comments, connect to YouTube API, fetch video comments, classify comments as positive, neutral and negative, and build a dashboard.

Primary LanguageJavaScript

Youtube-Sentiment-Analysis

Sentiment analysis on Youtube comments and how well the number of comments classified as positive, neutral and negative

Live Demo

https://bensonruan.com/youtube-sentiment-analysis/ sentiment

Installing

  1. Clone this repository to your local computer
git https://github.com/bensonruan/Youtube-Sentiment-Analysis.git
  1. On Google developer platform https://console.cloud.google.com/
  • Register a Google dev account
  • Create a Project
  • Enable YouTube Data API v3
  • Create an API key
  • Replace your API key in youtubeGetComments.php
  1. Install Google APIs Client Library
composer require google/apiclient:^2.0
  1. Config your path to the youtubeGetComments.php inside sentiment-analysis.js
ytGetComments:  window.location.protocol + '//'+ window.location.hostname + 'php/youtubeGetComments.php?v='
  1. Point your localhost to the cloned root directory. Browse to http://localhost/index.html

Note

If you are on Windows, you would need to install PHP via Web Platform Installer

Library

Support me

ko-fi