Personality

personality(data, {[api_key]: String, [cloud]: String})
Predicts the personality traits of a text’s author.

Current Version: 1

Arguments

data – String | List – required – text to be analyzed
[apiKey] – String – optional – your indico API key
[privateCloud] – String – optional – your private cloud subdomain
[v or version] – Integer – optional (defaults to 1) – specify model version

Output

This function returns a dictionary that maps the following personality traits to their likelihood of describing the author: extraversion, openness, agreeableness, conscientiousness. These values are independent, meaning the probabilities don’t effect each other. For example, somebody could score 0.9 (90%) on extraversion and 0.86 (86%) on openness.

# single output
{
    'extraversion': 0.384...,
    'openness': 0.730...,
    'agreeableness': 0.439...,
    'conscientiousness': 0.103...
}

# batch output
[
    {
        'extraversion': 0.384...,
        'openness': 0.730...,
        'agreeableness': 0.439...,
        'conscientiousness': 0.103...
    }, 
    {
        'extraversion': 0.384...,
        'openness': 0.730...,
        'agreeableness': 0.439...,
        'conscientiousness': 0.103...
    }
]

Example

var indico = require('indico.io');
indico.apiKey =  'YOUR_API_KEY';

var response = function(res) { console.log(res); }
var logError = function(err) { console.log(err); }
  
// single example
indico.personality("I love my friends")
  .then(response)
  .catch(logError);

// batch example
var batchInput = [
    "I love my friends",
    "Everything is awesome!"
];
indico.personality(batchInput)
  .then(response)
  .catch(logError);