8000 GitHub - inspaya/tweet_pulse: Measure the sentiment behind a piece of text, tweet, e.t.c
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

inspaya/tweet_pulse

Repository files navigation

Ceasefire Now

Tweet Pulse

This tool utilizes Google's Natural Language Processing API to analyze the sentiment behind a piece of text.

Google's NLP library handles sentence tokenization already.

Manual Setup

  • Using a Gmail account, create a new Google Cloud Platform project
  • Install the Cloud SDK for the operating system of your choice. This example runs on a Linux machine.
  • Create a Service Account as described in the link and update the path to GOOGLE_APPLICATION_CREDENTIALS in start.sh.example with yours.
  • Create a virtualenv for this project e.g.
$ virtualenv name_of_my_env --python=python2
  • Activate the virtualenv and install the project requirements via
$ source name_of_my_env && pip install -r requirements.txt
  • Rename start.sh.example to start.sh, change permissions on start.sh to make it executable. e.g. on Linux
$ mv start.sh.example start.sh
$ chmod +x start.sh
  • Launch the app from within the virtualenv by executing the following:
$ ./start.sh

Usage

  • Enter a piece of text in the box shown and click the Get Sentiments button to see results OR
  • Enter a twitter handle in the box provided and click Get Tweets and Sentiments button to see results

Screenshots

Form:

Enter one or more sentences

Sample Results:

Sentiment analyzed

Todo

  • Add Unit Tests
  • Add Mood Prediction based on the sentiments analyzed over a given time frame.

About

Measure the sentiment behind a piece of text, tweet, e.t.c

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0