如何解释分数为空的 Web 实体?
How do I interpret a web entity with a null score?
当我向 Google Vision API 发出网络检测请求时,我得到了一堆网络实体。列表中的最后一个实体没有分数——也就是说,'score' 不是 0,它只是 returns null。我找不到任何 Google 文档来解释空分数的含义。
我只看到一张图片一直出现这种情况(到目前为止)。
具有描述、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;
}
愿景API使用Protocol Buffers v3
An unset primitive field has a language-defined default value.
对于您的情况,如果分数不在响应中,则分数为默认值 0。
您可以通过将 entityId 发送至 Google Knowledge Graph Search API
来获取有关该实体的更多信息
当我向 Google Vision API 发出网络检测请求时,我得到了一堆网络实体。列表中的最后一个实体没有分数——也就是说,'score' 不是 0,它只是 returns null。我找不到任何 Google 文档来解释空分数的含义。
我只看到一张图片一直出现这种情况(到目前为止)。
具有描述、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;
}
愿景API使用Protocol Buffers v3
An unset primitive field has a language-defined default value.
对于您的情况,如果分数不在响应中,则分数为默认值 0。
您可以通过将 entityId 发送至 Google Knowledge Graph Search API
来获取有关该实体的更多信息