GithubHelp home page GithubHelp logo

5l1v3r1 / youtube-comments-sentiment-analyzer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coskundeniz/youtube-comments-sentiment-analyzer

0.0 1.0 0.0 1.24 MB

YouTube comments sentiment analyzer tool

License: Apache License 2.0

Python 100.00%

youtube-comments-sentiment-analyzer's Introduction

YouTube Comments Sentiment Analyzer

YouTube comments sentiment analyzer tool that makes polarity analysis. The result is saved as a pie chart output.

Related post on Medium


How to setup

  • Run the following commands to install the required packages

    • cd <project directory>
    • python -m venv env
    • source env/bin/activate
    • python -m pip install -r requirements.txt

How to use

usage: python yt_comments_analyzer.py [-h] [-u URL] [-c] [-cf CONFIGFILE] [-ir] [-o OUTPUT]

optional arguments:
  -h, --help                              show this help message and exit
  -u URL, --url URL                       Video URL to analyze comments
  -c, --useconfig                         Read configuration from config.json file
  -cf CONFIGFILE, --configfile CONFIGFILE Read configuration from given file
  -ir, --include_replies                  Include replies to top level comments
  -o OUTPUT, --output OUTPUT              Name or absolute path of the output chart

Example Commands

  • Get comments for the given video and output results to sentiment_analysis_chart.png file.
    • python yt_comments_analyzer.py -u https://www.youtube.com/watch?v=mM2-FPm1EhI

Result 1

  • Get comments with replies for the given video and output results to result_chart.png file.
    • python yt_comments_analyzer.py -u https://www.youtube.com/watch?v=ixzKvJeXrY4 -ir -o result_chart.png

Result 2

  • Get parameters from config.json file.

    • python yt_comments_analyzer.py -c
  • Get parameters from the given config file.

    • python yt_comments_analyzer.py -c -cf custom_config.json
  • Example video of an execution

Sample Execution

youtube-comments-sentiment-analyzer's People

Contributors

coskundeniz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.