Social Data Augmentation

Turn raw text and image data into human insight

See For Yourself

Machine Learning can be intimidating. At Indico, we make it easy.

Try our demo below to explore the power of our predictive models. Use the code toggle on the right to see how easy it is to integrate.

  • Positive Sentiment
  • Topic Tagger
  • Political Sentiment
  • Language Detection
  • Emotion Recognition
  • Image Features
/

Topic Tagger

Figure out what people are talking about. Our text tags API automatically determines which topics a piece of text relates to.

Most likely tags

energy
political discussion
right politics

 

require 'indico'
Indico.api_key = 'YOUR_API_KEY'

puts(Indico.text_tags('This coconut green tea is amazing!'))
# { "food"=>0.3713687833244494, "cars"=>0.0037924017632370586, ...}
import indicoio
indicoio.config.api_key = "YOUR_API_KEY"

tag_dict = indicoio.text_tags("Iran Agrees to Nuclear Limits, But Key Issues Are Unresolved")

print(sorted(tag_dict.keys(), key=lambda x: tag_dict[x], reverse=True)[:5])
# [u'investing', u'startups', u'business', u'entrepreneur', u'humor']

print(tag_dict)
# {u'fashion': 0.011450126534350728, u'art': 0.00358698972755963, u'energy': 0.005537894035625527, ...}
import io.indico.api.Indico;
import io.indico.api.exception.IndicoException;
import java.util.List;
import java.util.Arrays;
import java.util.Map;

public static void main(String[] args) throws IndicoException
{
  Indico.setApiKey('example-api-key');
}

public static void main(String[] args) throws IndicoException
{
  Map result = Indico.text().textTags("Blog posts about Android tech make better journalism than most news outlets.");
  List textData = Arrays.asList("Iran agress to nuclear limits, but key issues are unresolved.","We're supposed to get up to 24 inches of snow in the storm.");
  List> batchResults = Indico.text().batchTextTags(textData);
}
require(__DIR__ . '/vendor/autoload.php');
use \IndicoIo\IndicoIo as IndicoIo;

IndicoIo::$config['api_key'] = "YOUR_API_KEY";

print_r( IndicoIo::text_tags('Iran Agrees to Nuclear Limits, But Key Issues Are Unresolved'));

// Array ( [food]: 0.3713687833244494, [cars]: 0.0037924017632370586, ...)
var indico = require('indico.io');
indico.apiKey = "YOUR_API_KEY";

indico.text_tags("This coconut green tea is amazing.")
// {u'food': 0.3713687833244494, u'cars': 0.0037924017632370586, ...}
library(indicoio)

categories <- text_tags("Iran Agrees to Nuclear Limits, But Key Issues Are Unresolved", api_key = "YOUR_API_KEY")

categories
most.possible <- sort(unlist(categories), decreasing = TRUE)[1:2]
cat(sprintf("Detected category \%s with probability \%0.4f.\\n",
        names(most.possible)[1], most.possible[1]))
cat(sprintf("Next possible is \%s with probability \%0.4f.",
        names(most.possible)[2], most.possible[2]))

Positive Sentiment

Do they love it? Our sentiment API automatically determines whether a document is positive or negative.

Positivity

89%

 

require 'indico'
Indico.api_key = 'YOUR_API_KEY'

puts(Indico.sentiment("indico is so easy to use!"))
# {"Sentiment"=>0.900475156188022}
import indicoio
indicoio.config.api_key = "YOUR_API_KEY"

print(indicoio.sentiment('indico is so easy to use!'))
# 0.07062467665597527
import io.indico.api.Indico;
import io.indico.api.exception.IndicoException;
import java.util.List;
import java.util.Arrays;
import java.util.Map;

public static void main(String[] args) throws IndicoException
{
  Indico.setApiKey('example-api-key');
}

public static void main(String[] args) throws IndicoException
{
  doubled result = Indico.text().sentiment("Best day ever.");
  List textData = Arrays.asList("Best day ever",
                                        "Worst day ever");
  List batchResults = Indico.text().batchSentiment(textData);
}
require(__DIR__ . '/vendor/autoload.php');
use \IndicoIo\IndicoIo as IndicoIo;

IndicoIo::$config['api_key'] = "YOUR_API_KEY";

print_r(IndicoIo::sentiment("indico is so easy to use!"));

// Array ( [Sentiment] => 0.8254603561191486 )
var indico = require('indico.io');
indico.apiKey = "YOUR_API_KEY";

indico.sentiment('indico is so easy to use!', fn)
// {results: 0.07062467665597527}
library(indicoio)

emotion <- sentiment("indico is so easy to use!", api_key = "YOUR_API_KEY")

emotion
cat(sprintf("This text has %s tonality",
         ifelse(emotion > 0.5, "positive", "negative")))

Political Sentiment

Politics are complicated. Our political API will automatically recognize the political alignment of a body of text.

 

Most likely parties

Libertarian

45%

 

Conservative

37%

 

Liberal

13%

 

require 'indico'
Indico.api_key = 'YOUR_API_KEY'

puts(Indico.political("Those who surrender freedom for security will not have, nor do they deserve, either one."))
# {"Libertarian"=>0.47740164630834825, "Liberal"=>0.16617097211030055, "Green"=>0.08454409540443657, "Conservative"=>0.2718832861769146}
import indicoio
indicoio.config.api_key = "YOUR_API_KEY"

print(indicoio.political("Those who surrender freedom for security will not have, nor do they deserve, either one."))
# {u'Libertarian': 0.47740164630834825, u'Green': 0.08454409540443657, u'Liberal': 0.16617097211030055, u'Conservative': 0.2718832861769146}
import io.indico.api.Indico;
import io.indico.api.exception.IndicoException;
import java.util.List;
import java.util.Arrays;
import java.util.Map;

public static void main(String[] args) throws IndicoException
{
  Indico.setApiKey('example-api-key');
}

public static void main(String[] args) throws IndicoException
{
  Map result = Indico.text().politicalSentiment("Quis custodiet ipsos custodes");
  List textData = Arrays.asList("Quis custodiet ipsos custodes",
                                        "Clearly an English sentence.");
  List> batchResults = Indico.text().batchPoliticalSentiment(textData);
}
require(__DIR__ . '/vendor/autoload.php');
use \IndicoIo\IndicoIo as IndicoIo;

IndicoIo::$config['api_key'] = "YOUR_API_KEY";


print_r(IndicoIo::political("Those who surrender freedom for security will not have, nor do they deserve, either one."));

// Array ( [Libertarian] => 0.29189946558241 [Liberal] => 0.010490688696418 [Green] => 0.0110258933524 [Conservative] => 0.68658395236877 )
var indico = require('indico.io');
indico.apiKey = "YOUR_API_KEY";

indico.political('Those who surrender freedom for security will not have, nor do they deserve, either one.', fn)
// { Libertarian: 0.47740164630834825, Liberal: 0.16617097211030055, Green: 0.08454409540443657, Conservative: 0.2718832861769146}
library(indicoio)

affiliation <- political("Those who surrender freedom for security will not have, nor do they deserve, either one.", api_key = "YOUR_API_KEY")

affiliation
most.like <- names(affilation[which.max(unlist(affilation))])
least.like <- names(affilation[which.min(unlist(affilation))])
cat(sprintf("This text is most like %s and least like %s",
        most.like, least.like))

Language Detection

Websites usually have language headers, but for finding multi-lingual users, or filtering raw text, you're out of luck. Our language detection API will take care of that for you.

 

Most likely languages

French

70%

 

Lithuanian

18%

 

Portuguese

11%

 

require 'indico'
Indico.api_key = 'YOUR_API_KEY'

puts(Indico.language('Quis custodiet ipsos custodes'))
# {"Swedish"=>0.00033330636691921914, "Vietnamese"=>0.0002686116137658802, ... "Latin"=>0.8230599921384231, ...}
import indicoio
indicoio.config.api_key = "YOUR_API_KEY"

print(indicoio.language('Quis custodiet ipsos custodes'))
# {u'Swedish': 0.00033330636691921914, u'Vietnamese': 0.0002686116137658802, ... u'Latin': 0.8230599921384231, ... }
import io.indico.api.Indico;
import io.indico.api.exception.IndicoException;
import java.util.List;
import java.util.Arrays;
import java.util.Map;

public static void main(String[] args) throws IndicoException
{
  Indico.setApiKey('example-api-key');
}

public static void main(String[] args) throws IndicoException
{
  Map result = Indico.text().language("Quis custodiet ipsos custodes");
  List textData = Arrays.asList("Quis custodiet ipsos custodes",
                                        "Clearly an English sentence.");
  List> batchResults = Indico.text().batchLanguage(textData);
}
require(__DIR__ . '/vendor/autoload.php');
use \IndicoIo\IndicoIo as IndicoIo;

IndicoIo::$config['api_key'] = "YOUR_API_KEY";

print_r( IndicoIo::language('una giornata molto buona auguro') );

// Array ( [Swedish] => 0.00011552035349677 [Vietnamese] => 0.0010439073406634 ... [Italian] => 0.91248953273899 ... )
var indico = require('indico.io');
indico.apiKey = "YOUR_API_KEY";

indico.language('Quis custodiet ipsos custodes', fn)
// {u'Swedish': 0.00033330636691921914, u'Lithuanian': 0.007328693814717631, ... u'Latin': 0.8230599921384231, ... }
library(indicoio)

languages <- language("Monday: Delightful with mostly sunny skies.
                        Highs in the low 70s.", api_key = "YOUR_API_KEY")
languages
most.possible <- sort(unlist(languages), decreasing = TRUE)[1:2]
cat(sprintf("Detected %s language with probability %0.4f.\n",
        names(most.possible)[1], most.possible[1]))
cat(sprintf("Next possible is %s with probability %0.4f.",
        names(most.possible)[2], most.possible[2]))

Emotion Recognition

This powerful API reads the emotional state of faces, allowing you to get instant feedback, like automatically processing the results of your ad experiment. Click on the faces below to see how some of our team members are feeling today!

·
·
·
55%

happy

7%

surprised

16%

neutral

4%

sad

11%

fearful

8%

angry

 

require 'indico'
Indico.api_key = 'YOUR_API_KEY'

# creating a test face for demo purposes
test_face = Array.new(48, Array.new(48, 0.123))

puts(Indico.fer(test_face))
# {"Angry"=>0.08871302945302893, "Sad"=>0.39368196823094165, "Neutral"=>0.19148772584016358, "Surprise"=>0.03452161064102057, "Fear"=>0.17661406590357706, "Happy"=>0.11498159993126851}
import indicoio
indicoio.config.api_key = "YOUR_API_KEY"

import numpy as np

# create fake face
test_face = np.linspace(0,50,48*48).reshape(48,48).tolist()
print(indicoio.fer(test_face))
# {u'Angry': 0.08843749137458341, u'Sad': 0.39091163159204684, u'Neutral': 0.1947947999669361, u'Surprise': 0.03443785859010413, u'Fear': 0.17574534848440568, u'Happy': 0.11567286999192382}
import io.indico.api.Indico;
import io.indico.api.exception.IndicoException;
import java.util.List;
import java.util.Arrays;
import java.util.Map;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

public static void main(String[] args) throws IndicoException
{
  Indico.setApiKey('example-api-key');
}

public static void main(String[] args) throws IndicoException, IOException
{
  BufferedImage img = ImageIO.read(exampleImage);
  Map result = Indico.image().emotionalState(img);
  List imageData = Arrays.asList(img, img);
  List> batchResults = Indico.image().batchEmotionalState(imageData);
}
require(__DIR__ . '/vendor/autoload.php');
use \IndicoIo\IndicoIo as IndicoIo;

IndicoIo::$config['api_key'] = "YOUR_API_KEY";

print_r(IndicoIo::fer($b64data));

$batch = array($b64data, $b64data);
print_r(IndicoIo::batch_fer($batch));
// method 1
-(IQURLConnection*)facialEmotionRecognitionWithImage:(UIImage*)image completionHandler:(IQDictionaryCompletionBlock)completionHandler;

// method 2 (if you'd like to resize the image)
-(IQURLConnection*)facialEmotionRecognitionWithImage:(UIImage*)image resizeToSize:(CGSize)size completionHandler:(IQDictionaryCompletionBlock)completionHandler;

// usage
[[IndicoAPI service] facialEmotionRecognitionWithImage:[UIImage imageNamed:@"testImage"] completionHandler:^(NSDictionary *result, NSError *error) {
if (result) {
    //Convert result to model object.
    ICEmotionObject *object = [[ICEmotionObject alloc] initWithDictionary:result[kICResultsKey]];
}
else if (error) {
    //Error handling code goes here
}
}];
var indico = require('indico.io');
indico.apiKey = "YOUR_API_KEY";

/*
testFace is an array in the same format as
numpy.linspace(0, 50, 48*48).reshape(48,48).tolist()

You can find two examples of this data structure in ./test/data.json
*/
var testFace = [...];

indico.fer(testFace, fn);
// {Angry: 0.08843749137458341, Sad: 0.39091163159204684, Neutral: 0.1947947999669361, Surprise: 0.03443785859010413, Fear: 0.17574534848440568, Happy: 0.11567286999192382}
## Example 1
img <- matrix(runif(48*48, 0, 1), nrow = 48)
emotion <- face_emotion(img, api_key = "YOUR_API_KEY")

most.possible <- sort(unlist(emotion), decreasing = TRUE)[1:2]
cat(sprintf("Detected '%s' emotion with probability %0.4f.\n",
        names(most.possible)[1], most.possible[1]))
cat(sprintf("Next possible is '%s' emotion with probability %0.4f.",
        names(most.possible)[2], most.possible[2]))

## Example 2
# Reads PNG file
file.face <- system.file("extdata", "face1.png", package = "indicoio")
img <- readPNG(file.face)
# Converts to grayscale
img <- 0.2126 * img[, , 1] + 0.7152 * img[, , 2] + 0.0722 * img[, , 3]
# Plots image
plot(0:1, 0:1, xlab = "", ylab = "", axes = FALSE, col = "white")
rasterImage(img, xleft = 0, ybottom = 0, xright = 1, ytop = 1)
# Detects emotion
face_emotion(img)

Image Features

The Image Features API is used as a building block for other models with more applications. One use case could be to find images that have similar characteristics to one another — click any of the images below to rearrange the group based on how closely each picture resembles the one you chose. Reads left to right in order of decreasing similarity.

·
·
·
require 'indico'
Indico.api_key = 'YOUR_API_KEY'

# creating a test image for demo purposes
test_image = Array.new(48, Array.new(48, 0.123))

puts(Indico.image_features(test_image))
# [0.0, 0.0, 0.0, 3.045085906982422, ... 0.12163206934928894]
import indicoio
indicoio.config.api_key = "YOUR_API_KEY"

# create fake face
test_face = np.linspace(0,50,48*48).reshape(48,48).tolist()
print(indicoio.image_features(test_face))
# [0.0, -0.02568680526917187, ..., 3.0342637531932777]
import io.indico.api.Indico;
import io.indico.api.exception.IndicoException;
import java.util.List;
import java.util.Arrays;
import java.util.Map;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

public static void main(String[] args) throws IndicoException
{
  Indico.setApiKey('example-api-key');
}

public static void main(String[] args) throws IndicoException, IOException
{
  BufferedImage img = ImageIO.read(exampleImage);
  List result = Indico.image().imageFeatures(img);
  List imageData = Arrays.asList(img, img);
  List> batchResults = Indico.image().batchImageFeatures(imageData);
}
require(__DIR__ . '/vendor/autoload.php');
use \IndicoIo\IndicoIo as IndicoIo;

IndicoIo::$config['api_key'] = "YOUR_API_KEY";

print_r(IndicoIo::image_features($b64data));

$batch = array($b64data, $b64data);
print_r(IndicoIo::batch_image_features($batch));
// method 1 (no resize)
-(IQURLConnection*)imageFeaturesWithImage:(UIImage*)image completionHandler:(IQDictionaryCompletionBlock)completionHandler;

// method 2 (with resize)
-(IQURLConnection*)imageFeaturesWithImage:(UIImage*)image resizeToSize:(CGSize)size completionHandler:(IQDictionaryCompletionBlock)completionHandler;

// usage
[[IndicoAPI service] imageFeaturesWithImage:[UIImage imageNamed:@"testImage"] completionHandler:^(NSDictionary *result, NSError *error) {
if (result) {
    //Logic handling code goes here.
    NSLog(@"%@",result);
}
else if (error) {
    //Error handling code goes here
}
}];
var indico = require('indico.io');
indico.apiKey = "YOUR_API_KEY";

indico.facialFeatures(testFace, fn)
// [0.0, -0.02568680526917187, ... , 3.0342637531932777]
library(indicoio)

img <- matrix(runif(64*64, 0, 1), nrow = 64)
features <- image_features(img, api_key = "YOUR_API_KEY")

length(features)
min(unlist(features))
max(unlist(features))
sum(unlist(features))

Get Started

Get started with our APIs in just a few lines of code.
Signing up takes less than a minute!