Google Cloud Document Ai V1 Client - Class Entity (1.0.1)

Reference documentation and code samples for the Google Cloud Document Ai V1 Client class Entity.

An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.

Generated from protobuf message google.cloud.documentai.v1.Document.Entity

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ text_anchor Google\Cloud\DocumentAI\V1\Document\TextAnchor

Optional. Provenance of the entity. Text anchor indexing into the Document.text.

↳ type string

Required. Entity type from a schema e.g. Address.

↳ mention_text string

Optional. Text value of the entity e.g. 1600 Amphitheatre Pkwy.

↳ mention_id string

Optional. Deprecated. Use id field instead.

↳ confidence float

Optional. Confidence of detected Schema entity. Range [0, 1].

↳ page_anchor Google\Cloud\DocumentAI\V1\Document\PageAnchor

Optional. Represents the provenance of this entity wrt. the location on the page where it was found.

↳ id string

Optional. Canonical id. This will be a unique value in the entity list for this document.

↳ normalized_value Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue

Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.

↳ properties array<Google\Cloud\DocumentAI\V1\Document\Entity>

Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.

↳ provenance Google\Cloud\DocumentAI\V1\Document\Provenance

Optional. The history of this annotation.

↳ redacted bool

Optional. Whether the entity will be redacted for de-identification purposes.

getTextAnchor

Optional. Provenance of the entity.

Text anchor indexing into the Document.text.

Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Google\Cloud\DocumentAI\V1\Document\TextAnchor|null

hasTextAnchor

clearTextAnchor

setTextAnchor

Optional. Provenance of the entity.

Text anchor indexing into the Document.text.

Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var Google\Cloud\DocumentAI\V1\Document\TextAnchor
Returns
TypeDescription
$this

getType

Required. Entity type from a schema e.g. Address.

Generated from protobuf field string type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
string

setType

Required. Entity type from a schema e.g. Address.

Generated from protobuf field string type = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMentionText

Optional. Text value of the entity e.g. 1600 Amphitheatre Pkwy.

Generated from protobuf field string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
string

setMentionText

Optional. Text value of the entity e.g. 1600 Amphitheatre Pkwy.

Generated from protobuf field string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMentionId

Optional. Deprecated. Use id field instead.

Generated from protobuf field string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
string

setMentionId

Optional. Deprecated. Use id field instead.

Generated from protobuf field string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getConfidence

Optional. Confidence of detected Schema entity. Range [0, 1].

Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
float

setConfidence

Optional. Confidence of detected Schema entity. Range [0, 1].

Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getPageAnchor

Optional. Represents the provenance of this entity wrt. the location on the page where it was found.

Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Google\Cloud\DocumentAI\V1\Document\PageAnchor|null

hasPageAnchor

clearPageAnchor

setPageAnchor

Optional. Represents the provenance of this entity wrt. the location on the page where it was found.

Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var Google\Cloud\DocumentAI\V1\Document\PageAnchor
Returns
TypeDescription
$this

getId

Optional. Canonical id. This will be a unique value in the entity list for this document.

Generated from protobuf field string id = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
string

setId

Optional. Canonical id. This will be a unique value in the entity list for this document.

Generated from protobuf field string id = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getNormalizedValue

Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.

Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue|null

hasNormalizedValue

clearNormalizedValue

setNormalizedValue

Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.

Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue
Returns
TypeDescription
$this

getProperties

Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setProperties

Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.

Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var array<Google\Cloud\DocumentAI\V1\Document\Entity>
Returns
TypeDescription
$this

getProvenance

Optional. The history of this annotation.

Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Google\Cloud\DocumentAI\V1\Document\Provenance|null

hasProvenance

clearProvenance

setProvenance

Optional. The history of this annotation.

Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var Google\Cloud\DocumentAI\V1\Document\Provenance
Returns
TypeDescription
$this

getRedacted

Optional. Whether the entity will be redacted for de-identification purposes.

Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
bool

setRedacted

Optional. Whether the entity will be redacted for de-identification purposes.

Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var bool
Returns
TypeDescription
$this