Skip to content

PersonalityInsights

Michael edited this page Mar 21, 2017 · 5 revisions
namespace WatsonSDK\Services;

The IBM Watson™ Personality Insights service enables applications to derive insights from social media, enterprise data, or other digital communications. The service uses linguistic analytics to infer individuals' intrinsic personality characteristics, including Big Five, Needs, and Values, from digital communications such as email, text messages, tweets, and forum posts.

The service can automatically infer, from potentially noisy social media, portraits of individuals that reflect their personality characteristics. The service can infer consumption preferences based on the results of its analysis and, for JSON content that is timestamped, can report temporal behavior.

For information about the meaning of the models that the service uses to describe personality characteristics, see Personality models. For information about the meaning of the consumption preferences, see Consumption preferences.

class PersonalityInsights extends WatsonService

Used to initialize a PersonalityInsights instance from the instance of WatsonCredential.

function __construct(WatsonCredential $credential);

Generates a personality profile for the author of the input text. The service accepts a maximum of 20 MB of input content. It can analyze text in Arabic, English, Japanese, or Spanish and return its results in a variety of languages. You can provide plain text, HTML, or JSON input. The service returns output in JSON format by default, but you can request the output in CSV format.

For detailed information about calling the service and the responses it can generate, including the meaning of the numeric results, see Input: Requesting a profile and Output: Understanding a profile.

The parameters can be set in the given instance of WatsonSDK\Services\PersonalityInsights\ProfileModel.

public function getProfile(ProfileModel $model);

Sample

$insights = new PersonalityInsights(WatsonCredential::initWithCredentials('your_username', 'your_password'));

$model = new ProfileModel(new ContentItemModel('your content to be analyzed.'));
$model->addContent(new ContentItemModel('more content to be analyzed.'));
$result = $insights->getProfile($model);
Clone this wiki locally