Text Tags

POST https://apiv2.indico.io/texttags?version=[version]
Determine the topics in the phrase or document.

Current Version: 2

Private cloud endpoint

POST https://[cloud].indico.domains/texttags/[batch]/

Arguments

data – String | List – required – text to be analyzed[top_n] – Integer – optionals – only return this many of the most likely topics[threshold] – Float (defaults to 0.) – optional – only return topics with likelihood greater than this number

For an example of how to pass keyword arguments to the indico API in a post request, see the example below.

Output

This function will return a dictionary with 111 key-value pairs. These key-value pairs represent the likelihood that the analyzed text is about each of the 111 possible topics. The keys in the dictionary are strings containing the topic names and the values are the probabilities that the analyzed text is about each topic.

Example

// Single Example
fetch('https://apiv2.indico.io/texttags', {
method: 'POST',
body: JSON.stringify({
api_key: 'YOUR_API_KEY',
data: 'The most common form of arrow consists of a shaft with an arrowhead attached to the front end and with fletchings and a nock attached to the other end.',
threshold: 0.1
})
})
.then(r => r.json())
.then(response => {
console.log(response);
})
.catch(err => console.log(err));
// Batch Example
fetch('https://apiv2.indico.io/texttags/batch', {
method: 'POST',
body: JSON.stringify({
api_key: 'YOUR_API_KEY',
data: [
'The most common form of arrow consists of a shaft with an arrowhead attached to the front end and with fletchings and a nock attached to the other end.',
'Yoga in Indian traditions, however, is more than physical exercise, it has a meditative and spiritual core.'
],
threshold: 0.1
})
})
.then(r => r.json())
.then(response => {
console.log(response);
})
.catch(err => console.log(err));