Sentiment Analysis

Notice – All publicly available Indico APIs will be deprecated on Jan 1, 2020

Quickly and efficiently determine if text is positive or negative.

Current Version: 1


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
[language] – String (defaults to ‘english’) – optional – The language of the input text. If set to ‘detect’, Sentiment will first attempt to determine the language of the input text and calculate sentiment in that language. The language options are ‘arabic’, ‘chinese’, ‘dutch’, ‘english’, ‘french’, ‘german’, ‘italian’, ‘japanese’, ‘korean’, ‘portuguese’, ‘russian’, and ‘spanish’.


This function will return a number between 0 and 1. This number is a probability representing the likelihood that the analyzed text is positive or negative. Values greater than 0.5 indicate positive sentiment, while values less than 0.5 indicate negative sentiment.

// single output

// batch output


import indicoio
indicoio.config.api_key = 'YOUR_API_KEY';

# single example
indicoio.sentiment("I love writing code!")

# batch example
    "I love writing code!",
    "Alexander and the Terrible, Horrible, No Good, Very Bad Day"