You can access the capabilities of the Personality Insights service via an HTTP Representational State Transfer (REST) API. Several Software Development Kits (SDKs) are also available to simplify application development in various languages and environments. The following sections provide an overview of application development with the service.
To produce a personality portrait, you send text written by the individual of interest to the service's HTTP
POST profile method. The service returns output that provides insight into the personality characteristics of the author in terms of personality models and optional consumption preferences. You can request that the service return JSON or CSV output.
The service reports a percentile and an optional raw score for each characteristic that it analyzes. If the input text contains timestamps, the output includes temporal information about the percentage of the input that was created on each day of the week and hour of the day. Optionally, the service can also report a score for each consumption preference that indicates the author's preferences for different products, services, and activities.
For more information about using the service's
profile method, see Input: Requesting a profile and Output: Understanding a profile. For detailed information about the meaning of a profile, see Personality models and Consumption preferences.
D3.js) library to depict the results. For information about these client-side files, see the sample applications cited in Using Software Development Kits; for more information about
D3.js, see d3js.org.
The service supports Cross-Origin Resource Sharing (CORS) to allow browser-based clients to make asynchronous requests directly to the service from front-end scripts. CORS lets clients request resources from a domain that is outside the domain from which the request originated; it lets web applications work around the same-origin security policy, which otherwise prevents such requests. For more information, see enable-cors.org.
The Personality Insights service supports a number of SDKs for simplified application development. The SDKs are available for many popular programming languages and platforms, including Node.js, Java, Python, and Apple® iOS. For a complete list of SDKs and information about using them, see Watson SDKs. All SDKs are available from the watson-developer-cloud namespace on GitHub.
The service also makes available the following sample applications to help you get started:
All SDKs support authenticating by using either your Bluemix® service credentials or an authentication token.
The Personality Insights service supports two typical programming models: Direct interaction, in which the client communicates with the service directly; and relaying via a proxy, in which the client and service exchange all data (requests and results) through a proxy application that resides in Bluemix®.
For more information about working with Watson Developer Cloud services and Bluemix, see the following:
For an introduction to working with Watson services and Bluemix, see Getting started with Watson and Bluemix.
For a language-independent introduction to developing Watson services applications in Bluemix, see Bluemix development approaches.
For information about the two programming models available for developing Watson applications, see Programming models for Watson services:
For information about controlling the default request logging that is performed for all Watson services, see Controlling request logging for Watson services.