dezzie / personality-insights-twitter-java

A sample of how to call the Watson Personality Insights API with twitter data in java.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IBM Watson Personality Insights Twitter Java Sample

This sample shows how to get Twitter data using the Twitter REST API (via the Twitter4j client library) and submit it to the Personality Insights Service.

For non-twitter samples and more details on how to setup your Personality Insights service in bluemix see the official Watson Developer Cloud sample.

To configure the sample, copy twittersample.properties.example to twittersample.properties and fill in your Twitter and Personality Insights Credentials. Instructions are provided in the example properties file.

Building the sample

To build the code, use the provided gradle build file and wrapper configuration.

On Mac or Linux:

./gradlew build

On Windows:

./gradlew.bat build

Running the sample

To run the sample, run the TwitterAnalyzer java class and pass in a twitter user's handle (with an @ sign) or their numerical id.

Example:

java com.ibm.watson.personalityinsights.sample.twitter.TwitterAnalyzer @jschoudt

About

A sample of how to call the Watson Personality Insights API with twitter data in java.


Languages

Language:Java 100.0%