bensonruan / Sentiment-Analysis

Twitter Sentiment Analysis

Home Page:https://bensonruan.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sentiment-Analysis

Twitter Sentiment Analysis with Tensorflow.js

Connect to Twitter API, gather tweets by hashtag, compute the sentiment of each tweet, and build a real-time dashboard to show the result.

Live Demo

https://bensonruan.com/twitter-sentiment-analysis-with-tensorflowjs

sentiment

Installing

  1. Clone this repository to your local computer
git https://github.com/bensonruan/Sentiment-Analysis.git
  1. On Twitter developer platform https://developer.twitter.com/
  • Register a Twitter dev account
  • Create a Twitter App
  • Get the Consumer API keys and Access tokens
  • Replace your API keys in queryTwitter.php
  1. Config your path to the queryTwitter.php inside sentiment-analysis.js and sentiment-analysis-bundle.js
queryTwitter:  window.location.protocol + '//'+ window.location.hostname + '/js/sentiment/queryTwitter.php?q='
  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

About

Twitter Sentiment Analysis

https://bensonruan.com

License:MIT License


Languages

Language:PHP 47.5%Language:JavaScript 28.8%Language:HTML 16.0%Language:CSS 7.7%