Concept Insights annotateText调用中text_index参数的含义是什么?

时间:2015-12-11 04:47:09

标签: ibm-watson concept-insights

示例/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参数的含义是什么?

1 个答案:

答案 0 :(得分:2)

text_index告诉您已识别概念的起点和终点位置。

在您的示例中,代码IBM_Watson中标识了IBM announces new Watson概念。