Text Analysis

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

Use our models to analyze text in a variety of contexts!

Input Text Format

Text can be sent to the indicoio text analysis functions as raw text strings or URLs. If the indicoio API detects the text input is a URL, the text function will be run on the webpage text of the URL. Both single and batch requests of over 5 MB will be rejected. Sample code for passing in raw text or a URL is provided below.

Passing in Raw Text

import indicoio

indicoio.sentiment('text to analyze')

Specifying Text URL

import indicoio

indicoio.sentiment('https://TEXT_URL')

Sentence Splitting

If you’d like indico to automatically handle splitting your documents up into sentences or paragraphs to provide a more detailed analysis of your data, all of our text APIs feature a split keyword argument for providing sentence or paragraph level API results.

The valid options for the split keyword are "sentence" and "paragraph".

Output

A list of dictionaries, where each dictionary contains the position, text, and results keys. The position key contains information on the indexes into the original document, the text key contains the analyzed sentence or document, and the results key contains the output of the API.

[{u'position': [0, 23],
  u'results': 8.478955551191238e-05,
  u'text': u'This sentence is awful.'},
 {u'position': [24, 47],
  u'results': 0.9694245630414513,
  u'text': u'This sentence is great!'}]

Example