Skip to content

bensonruan/Sentiment-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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