#[non_exhaustive]pub struct EntityAnnotation {
pub mid: String,
pub locale: String,
pub description: String,
pub score: f32,
pub confidence: f32,
pub topicality: f32,
pub bounding_poly: Option<BoundingPoly>,
pub locations: Vec<LocationInfo>,
pub properties: Vec<Property>,
/* private fields */
}Expand description
Set of detected entity features.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mid: StringOpaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.
locale: StringThe language code for the locale in which the entity textual
description is expressed.
description: StringEntity textual description, expressed in its locale language.
score: f32Overall score of the result. Range [0, 1].
confidence: f32Deprecated. Use score instead.
The accuracy of the entity detection in an image.
For example, for an image in which the “Eiffel Tower” entity is detected,
this field represents the confidence that there is a tower in the query
image. Range [0, 1].
topicality: f32The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of “tower” is likely higher to an image containing the detected “Eiffel Tower” than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].
bounding_poly: Option<BoundingPoly>Image region to which this entity belongs. Not produced
for LABEL_DETECTION features.
locations: Vec<LocationInfo>The location information for the detected entity. Multiple
LocationInfo elements can be present because one location may
indicate the location of the scene in the image, and another location
may indicate the location of the place where the image was taken.
Location information is usually present for landmarks.
properties: Vec<Property>Some entities may have optional user-supplied Property (name/value)
fields, such a score or string that qualifies the entity.
Implementations§
Source§impl EntityAnnotation
impl EntityAnnotation
pub fn new() -> Self
Sourcepub fn set_locale<T: Into<String>>(self, v: T) -> Self
pub fn set_locale<T: Into<String>>(self, v: T) -> Self
Sets the value of locale.
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
Sourcepub fn set_confidence<T: Into<f32>>(self, v: T) -> Self
👎Deprecated
pub fn set_confidence<T: Into<f32>>(self, v: T) -> Self
Sets the value of confidence.
Sourcepub fn set_topicality<T: Into<f32>>(self, v: T) -> Self
pub fn set_topicality<T: Into<f32>>(self, v: T) -> Self
Sets the value of topicality.
Sourcepub fn set_bounding_poly<T>(self, v: T) -> Selfwhere
T: Into<BoundingPoly>,
pub fn set_bounding_poly<T>(self, v: T) -> Selfwhere
T: Into<BoundingPoly>,
Sets the value of bounding_poly.
Sourcepub fn set_or_clear_bounding_poly<T>(self, v: Option<T>) -> Selfwhere
T: Into<BoundingPoly>,
pub fn set_or_clear_bounding_poly<T>(self, v: Option<T>) -> Selfwhere
T: Into<BoundingPoly>,
Sets or clears the value of bounding_poly.
Sourcepub fn set_locations<T, V>(self, v: T) -> Self
pub fn set_locations<T, V>(self, v: T) -> Self
Sets the value of locations.
Sourcepub fn set_properties<T, V>(self, v: T) -> Self
pub fn set_properties<T, V>(self, v: T) -> Self
Sets the value of properties.
Trait Implementations§
Source§impl Clone for EntityAnnotation
impl Clone for EntityAnnotation
Source§fn clone(&self) -> EntityAnnotation
fn clone(&self) -> EntityAnnotation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more