Skip to content

A novice's implementation of twitter sentiment analysis with NodeJS (REST API with Sails.js) , MongoDB + Mongoose, Twitter API and sentiment (AFINN based)

Notifications You must be signed in to change notification settings

vishwajeetv/twitter-sentiment-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

twitter-sentiment-analysis

A novice's implementation of real-time twitter sentiment analysis.

A working, live demo is available here: https://vishwajeetv.com/twitter

Here's an informal blog post explaining how this is built : https://www.vishwajeetv.com/how-did-i-built-real-time-twitter-sentiment-analyser/

Demo Video - https://youtu.be/YEaFMTN4BlU

Built with:

  • NodeJS (REST API with Sails.js)
  • MongoDB
  • Twitter API
  • sentiment (nodejs tool for sentiment analysis - AFINN based)
  • natural (Nodejs NLP toolkit)
  • AngularJS (frontend)
  • Firebase (real-time data storage / updation PaaS), AngularFire

How to run

  • Obtain Twitter API usage tokens from Twitter API dashboard, set them in config.json
  • Create database 'twitter' in MongoDB
  • Run cd twitter && sails lift
  • Run cd ../frontend && npm install && bower install
  • Run grunt serve

TODO

  • Daemon to fetch 100 tweets and saving them whenever allowed.

Notes

  • For production setup, do this echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
  • To install sails, use this sudo npm install --unsafe-perm --verbose -g sails
  • To start the production server, use forever start app.js --prod

About

A novice's implementation of twitter sentiment analysis with NodeJS (REST API with Sails.js) , MongoDB + Mongoose, Twitter API and sentiment (AFINN based)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published