boot-twitter-sentiment

Project: Pivotal CF natural language processing (NLP) of twitter tweets.

GitHub Logo

boot-twitter-feeder and boot-twitter-visualizer spring boot applications.

boot-twitter-feeder:

  • queries twitter ( ex. for tweets with a certain hashtag)
  • tweet sentiment analysis with CoreNLP library
  • sends the tweet sentiment analysis result to a db and to rabbit
  • spring integration-graph GitHub Logo

boot-twitter-visualizer:

  • receives the tweet sentiment analysis via rabbit and sends it in realtime via websocket to all connected browsers.
  • visualizes the sentiment analysis result in realtime in a dashboard view
  • visualizes the sentiment analysis result in a report view

Twitter Limitations

Please, be aware that the number of tweets allowed to gather per hour from twitter is per default limited. After the limit is reached no more tweets are gathered for some time.

Prerequisites

Please, use your own twitter credentials. You get them here: https://apps.twitter.com/app/new

Run it on PCF

env:
  twitter_query: '#HillaryClinton'
  twitter_oauth_consumerKey: **ENTER YOUR** Consumer Key
  twitter_oauth_consumerSecret: **ENTER YOUR** Consumer Secret
  twitter_oauth_accessToken: ENTER **YOUR Access** Token
  twitter_oauth_accessTokenSecret: **ENTER YOUR** Access Token Secret
  • cf push

Run it local

  • rabbitmq-server
  • mysql.server start
  • mysql -uroot
  • create database twitter;
  • cd spring-boot-visualizer
  • mvn spring-boot:run
  • cd spring-boot-feeder
export twitter_query='#greenday'
export twitter_oauth_consumerKey=**ENTER YOUR** Consumer Key
export twitter_oauth_consumerSecret=**ENTER YOUR** Consumer Secret
export twitter_oauth_accessToken=**ENTER YOUR** Access Token
export twitter_oauth_accessTokenSecret=**ENTER YOUR** AccessTokenSecret
  • mvn spring-boot:run