# Cloud Vision V1 API - Class Google::Cloud::Vision::V1::EntityAnnotation (v1.7.0)

1.7.0 (latest) 1.6.0 1.5.1 1.4.0 1.3.1 1.2.1 1.1.0 1.0.1 0.15.0 0.14.0 0.13.2 0.12.0 0.11.1 0.10.0 0.9.0 0.8.0 0.7.0 0.6.4 Reference documentation and code samples for the Cloud Vision V1 API class Google::Cloud::Vision::V1::EntityAnnotation.

Set of detected entity features.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #bounding_poly

    def bounding_poly() -> ::Google::Cloud::Vision::V1::BoundingPoly

**Returns**

- ([::Google::Cloud::Vision::V1::BoundingPoly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest/Google-Cloud-Vision-V1-BoundingPoly)) --- Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features.

### #bounding_poly=

    def bounding_poly=(value) -> ::Google::Cloud::Vision::V1::BoundingPoly

**Parameter**

- **value** ([::Google::Cloud::Vision::V1::BoundingPoly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest/Google-Cloud-Vision-V1-BoundingPoly)) --- Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features.
**Returns**

- ([::Google::Cloud::Vision::V1::BoundingPoly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest/Google-Cloud-Vision-V1-BoundingPoly)) --- Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features.

### #confidence

    def confidence() -> ::Float

**Returns**

- (::Float) --- **Deprecated. 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\].

### #confidence=

    def confidence=(value) -> ::Float

**Parameter**

- **value** (::Float) --- **Deprecated. 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\].
**Returns**

- (::Float) --- **Deprecated. 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\].

### #description

    def description() -> ::String

**Returns**

- (::String) --- Entity textual description, expressed in its `locale` language.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- Entity textual description, expressed in its `locale` language.
**Returns**

- (::String) --- Entity textual description, expressed in its `locale` language.

### #locale

    def locale() -> ::String

**Returns**

- (::String) --- The language code for the locale in which the entity textual `description` is expressed.

### #locale=

    def locale=(value) -> ::String

**Parameter**

- **value** (::String) --- The language code for the locale in which the entity textual `description` is expressed.
**Returns**

- (::String) --- The language code for the locale in which the entity textual `description` is expressed.

### #locations

    def locations() -> ::Array<::Google::Cloud::Vision::V1::LocationInfo>

**Returns**

- (::Array\<[::Google::Cloud::Vision::V1::LocationInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest/Google-Cloud-Vision-V1-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.

### #locations=

    def locations=(value) -> ::Array<::Google::Cloud::Vision::V1::LocationInfo>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Vision::V1::LocationInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest/Google-Cloud-Vision-V1-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.
**Returns**

- (::Array\<[::Google::Cloud::Vision::V1::LocationInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest/Google-Cloud-Vision-V1-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.

### #mid

    def mid() -> ::String

**Returns**

- (::String) --- Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search
  API](https://developers.google.com/knowledge-graph/).

### #mid=

    def mid=(value) -> ::String

**Parameter**

- **value** (::String) --- Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search
  API](https://developers.google.com/knowledge-graph/).
**Returns**

- (::String) --- Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search
  API](https://developers.google.com/knowledge-graph/).

### #properties

    def properties() -> ::Array<::Google::Cloud::Vision::V1::Property>

**Returns**

- (::Array\<[::Google::Cloud::Vision::V1::Property](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest/Google-Cloud-Vision-V1-Property)\>) --- Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.

### #properties=

    def properties=(value) -> ::Array<::Google::Cloud::Vision::V1::Property>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Vision::V1::Property](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest/Google-Cloud-Vision-V1-Property)\>) --- Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.
**Returns**

- (::Array\<[::Google::Cloud::Vision::V1::Property](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest/Google-Cloud-Vision-V1-Property)\>) --- Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.

### #score

    def score() -> ::Float

**Returns**

- (::Float) --- Overall score of the result. Range \[0, 1\].

### #score=

    def score=(value) -> ::Float

**Parameter**

- **value** (::Float) --- Overall score of the result. Range \[0, 1\].
**Returns**

- (::Float) --- Overall score of the result. Range \[0, 1\].

### #topicality

    def topicality() -> ::Float

**Returns**

- (::Float) --- The 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\].

### #topicality=

    def topicality=(value) -> ::Float

**Parameter**

- **value** (::Float) --- The 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\].
**Returns**

- (::Float) --- The 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\].