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
[api_key] – String – optional – your indico API key
[cloud] – 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

require 'indico'
Indico.api_key =  'YOUR_API_KEY'

# single example
Indico.personality("I love my friends")

# batch example
Indico.personality([
    "I love my friends",
    "Everything is awesome!"
])