Значение параметра text_index в вызове Concept Insights annotateText?

Пример Вызов /annotateText Concept Insights предоставляет следующий пример вывода:

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
      ]
    }
  ]
}

Что означает возвращаемый параметр text_index?


person Aleksey Bilogur    schedule 11.12.2015    source источник


Ответы (1)


text_index сообщает вам начальную и конечную позицию, где находится идентифицированное понятие.

В вашем примере концепт IBM_Watson был идентифицирован во фрагменте IBM announces new Watson.

person German Attanasio    schedule 11.12.2015