Sentiment analysis on Youtube comments and how well the number of comments classified as positive, neutral and negative
https://bensonruan.com/youtube-sentiment-analysis/
- Clone this repository to your local computer
git https://github.com/bensonruan/Youtube-Sentiment-Analysis.git
- 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
- Install Google APIs Client Library
composer require google/apiclient:^2.0
- Config your path to the youtubeGetComments.php inside sentiment-analysis.js
ytGetComments: window.location.protocol + '//'+ window.location.hostname + 'php/youtubeGetComments.php?v='
- Point your localhost to the cloned root directory. Browse to http://localhost/index.html
If you are on Windows, you would need to install PHP via Web Platform Installer
- youtube-data-api-v3 - YouTube Data API v3 PHP Client Library
- jquery - JQuery
- tensorflow.js sentiment - Perform text sentiment analysis on text using the Layers API of TensorFlow.js
- canvasjs - JQuery chart library