我正在尝试使用watson discovery api,并发出如下请求:
https://gateway.watsonplatform.net/discovery/api/v1
/environments/6da44f3d-678f-476a-ae8b-cf69327fcf93
/collections/f9c98c9e-be05-4a00-bc93-7159f5441251/query
?version=2016-11-07
&query=text:Ukraine,taxonomy:(label:technology,score>0.8)
&count=10
&offset=
&aggregation=
&filter=
&return=响应中的第一个项目的分类如下:
"taxonomy": [
{
"score": "0.976715",
"label": "/law, govt and politics/armed forces/army"
},
{
"confident": "no",
"score": "0.499065",
"label": "/technology and computing/computer certification"
},
{
"confident": "no",
"score": "0.496026",
"label": "/law, govt and politics/legal issues/human rights"
}
]`分类的项目标记为“技术”有分数0.499065,但我需要的项目,具有标签与单词“技术”和分数>0.8 (不是OR)。如何更改我的请求以获得我想要的?谢谢。
发布于 2017-04-19 08:27:40
让我们先后退一步。此查询的目标是找到文本引用了“乌克兰”的文档,然后过滤所有结果,以便它们的分类技术存在并且得分超过0.8
如果不能访问您的环境,我无法亲自测试它,但它应该是
https://gateway.watsonplatform.net/discovery/api/v1
/environments/6da44f3d-678f-476a-ae8b-cf69327fcf93
/collections/f9c98c9e-be05-4a00-bc93-7159f5441251/query
?version=2016-11-07
&query=text:Ukraine
&count=10
&offset=
&aggregation=
&filter=taxonomy:(label:technology,score>0.8)
&return=https://stackoverflow.com/questions/43111236
复制相似问题