1

The example /annotateText Concept Insights call provides the following example output:

curl -H 'Content-Type: text/plain' -d 'IBM announces new Watson services.' 

'https://watson-api-explorer.mybluemix.net/concept-insights/api/v2/graphs/wikipedia/en-20120601/annotate_text'

{
  "annotations": [
    {
      "concept": {
        "id": "/graphs/wikipedia/en-20120601/concepts/Watson_(computer)",
        "label": "Watson (computer)"
      },
      "score": 0.99832845,
      "text_index": [
        18,
        24
      ]
    },
    {
      "concept": {
        "id": "/graphs/wikipedia/en-20120601/concepts/IBM",
        "label": "IBM"
      },
      "score": 0.9980473,
      "text_index": [
        0,
        3
      ]
    }
  ]
}

What is the meaning of the text_index parameter that is being returned?

German Attanasio
  • 22,217
  • 7
  • 47
  • 63
Aleksey Bilogur
  • 3,686
  • 3
  • 30
  • 57

1 Answers1

2

text_index tells you the start and end position where the identified concept is.

In your example, the concept IBM_Watson was identified in the snippet IBM announces new Watson.

German Attanasio
  • 22,217
  • 7
  • 47
  • 63