Public Repository

Last pushed: 5 months ago
Short Description
This application will accept a text string and pass it on to IBM Watson's tone analysis service.
Full Description

This application is a simple microservice that will accept a text string and pass it on to IBM Watson's tone analysis service. To use this application you will need to have IBM Bluemix and a Watson Tone Analysis Service setup and enabled.

You will need to have the enviornment variables set with the credentials you get from the IBM Watson Bluemix interface.

Configuration

You will need to have an env.list file that will define your credentials from BlueMix for IBM Watson in the following format

BLUEMIXUSER=<your username>
BLUEMIXPASS=<your password>
BLUEMIXTONEURL=https://gateway.watsonplatform.net/tone-analyzer/api/v3/tone?version=2016-05-19

Redis Cache

If you want to take advantage of Redis to cache content so that you do not send duplicate content multiple times to Bluemix for processing set the SIDECAR environment variable to the host of your Redis instance. Your Redis instance must be on the default port.

SIDECAR=redis.mydomain.com

Starting

docker run --env-file env.list -p 5000:5000 allengeer/toneanalysis:latest

Usage

Status

http://localhost:5000/status

Example

http://localhost:5000/analyze?text=happy

Docker Pull Command
Owner
allengeer

Comments (0)