Skip to content

Latest commit

 

History

History
83 lines (53 loc) · 3.93 KB

File metadata and controls

83 lines (53 loc) · 3.93 KB

##Personality Insights Introduction

The IBM Watson Personality Insights service uses linguistic analytics to infer cognitive and social characteristics, including Big Five, Values, and Needs, from communications that the user makes available, such as email, text messages, tweets, forum posts, and more, go to personal-insights for a full description and demo

The objective is to send the Personality Insights node the same data as for the demo (https://watson-pi-demo.mybluemix.net/) and to show the JSON object and its values match those of the demo

Check out this page for full instructions on getting started with Node-RED.

##Deploy Node-RED on Bluemix

  • You need a Bluemix account. Log into the Bluemix.
  • Verify that your region setting is set to US South. ScreenShot
  • When you are logged in go to 'Catalog' and click on the 'Node-RED starter' application in Boilerplates.
  • On the right side of the screen you must give it a unique name ( this name is your hostname and so needs to be unique across all of Bluemix. For example < YourName >nodered< pick3numbers > like salnodered123.) Then click 'Create'.
  • Right now the Node-RED application is being created and deployed. This will take a few minutes.
  • OPTIONAL FOR DEVELOPERS - Follow the instructions to install cloud foundry or cf

##Personality Insights Lab

  • Go back to the Bluemix dashboard by clicking DASHBOARD on top and click on the icon of the nodered application you just created.
  • Pick “Add a Service or API” and click the Personality Insights node under Watson section. Make sure your Application is listed and click on Create. Click on Restage.
  • After Restage is complete and the app has started click on the url under the name of APP on the top left side.
  • Once NodeRed opens click on 'Go to your Node-Red flow editor'

Check out this page for full instructions on getting started with Node-RED.

  • Drag an inject node to the palette.
  • Drag the personality insights node to the palette.
  • Drag a debug node to the palette.
  • Join them as shown below

ScreenShot

  • Double-click the debug node and replace ‘payload’ to ‘insights’. Also change “to” to “debug tab and console” ScreenShot

  • Double-click the inject node and change Payload to string.
    Go to sample file and open the file and paste the text to the blank field below the Payload field (this is the same text that is used in the demo).

  • Click Ok

ScreenShot


Optional Steps if you want to see logs on the cloud


  • Open a command line on your laptop and login to Bluemix with your username/password. Making sure that you are connecting to the appropriate datacenter for your application.
  • For US South it will look like

ScreenShot,

  • for the UK

ScreenShot

  • and for Sydney

ScreenShot

  • Type cf logs app_name where app_name is the name of your application.


  • Return to the Node-RED palette.
  • Click the Deploy button
  • Click on the debug tab to the top right of the palette.
  • Click the button next to the inject node.

You will see an output in the debug tab starting with '{ [msg.insights] : object }' followed by the JSON object. NOTE : you will not be able to see the full object

ScreenShot

Go back to the command prompt and see that the full object has been shown.

ScreenShot

Compare the items in the JSON object to those of the demo for Personality Insights - you can see that the values shown are the same (or very similar).

A completed flow file card be found here