当我向提出web检测请求时,我会得到一堆web实体。列表中的最后一个实体没有分数--也就是说,' score‘不是0,它只是返回null。我找不到任何谷歌文档解释零分数意味着什么。
我只在一张图片上看到这种情况(到目前为止)。
具有描述、entityId和分数的普通WebEntity示例:
{
"description": "Car",
"entityId": "/m/11afgkh",
"score": "0.24221982"
}
我得到的实际WebEntity:
{
"description": "Unbreakable",
"entityId": "/g/11f_s_bdwj",
}
如何解释零分数?还有..。我知道这不是话题,但是entityId到底是用来做什么的呢?除了代码中的注释之外,我找不到关于这两种情况的大量文档:
/**
* Overall relevancy score for the entity. Not normalized and not comparable across different
* image queries.
* @return value or {@code null} for none
*/
public java.lang.Float getScore() {
return score;
}
/**
* Opaque entity ID.
* @return value or {@code null} for none
*/
public java.lang.String getEntityId() {
return entityId;
}
发布于 2019-06-05 07:42:32
Vision API使用协议缓冲器v3
未设置原语字段具有语言定义的默认值.
在您的示例中,如果响应中没有得分,则得分是默认值0。
通过将entityId发送到Google知识图搜索API,您可以获得有关实体的更多信息。
https://stackoverflow.com/questions/56399486
复制相似问题