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 messagegoogle.cloud.documentai.v1.Document.Entity
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.
Optional. Canonical id. This will be a unique value in the entity list
for this document.
Returns
Type
Description
string
setId
Optional. Canonical id. This will be a unique value in the entity list
for this document.
Parameter
Name
Description
var
string
Returns
Type
Description
$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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Document Ai V1 Client - Class Entity (2.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.0 (latest)](/php/docs/reference/cloud-document-ai/latest/V1.Document.Entity)\n- [2.2.2](/php/docs/reference/cloud-document-ai/2.2.2/V1.Document.Entity)\n- [2.1.3](/php/docs/reference/cloud-document-ai/2.1.3/V1.Document.Entity)\n- [2.0.0](/php/docs/reference/cloud-document-ai/2.0.0/V1.Document.Entity)\n- [1.14.0](/php/docs/reference/cloud-document-ai/1.14.0/V1.Document.Entity)\n- [1.13.1](/php/docs/reference/cloud-document-ai/1.13.1/V1.Document.Entity)\n- [1.12.2](/php/docs/reference/cloud-document-ai/1.12.2/V1.Document.Entity)\n- [1.9.0](/php/docs/reference/cloud-document-ai/1.9.0/V1.Document.Entity)\n- [1.8.2](/php/docs/reference/cloud-document-ai/1.8.2/V1.Document.Entity)\n- [1.7.0](/php/docs/reference/cloud-document-ai/1.7.0/V1.Document.Entity)\n- [1.6.0](/php/docs/reference/cloud-document-ai/1.6.0/V1.Document.Entity)\n- [1.5.0](/php/docs/reference/cloud-document-ai/1.5.0/V1.Document.Entity)\n- [1.4.0](/php/docs/reference/cloud-document-ai/1.4.0/V1.Document.Entity)\n- [1.3.0](/php/docs/reference/cloud-document-ai/1.3.0/V1.Document.Entity)\n- [1.2.2](/php/docs/reference/cloud-document-ai/1.2.2/V1.Document.Entity)\n- [1.1.1](/php/docs/reference/cloud-document-ai/1.1.1/V1.Document.Entity)\n- [1.0.1](/php/docs/reference/cloud-document-ai/1.0.1/V1.Document.Entity) \nReference documentation and code samples for the Google Cloud Document Ai V1 Client class Entity.\n\nAn entity that could be a phrase in the text or a property that belongs to\nthe document. It is a known entity type, such as a person, an organization,\nor location.\n\nGenerated from protobuf message `google.cloud.documentai.v1.Document.Entity`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ DocumentAI \\\\ V1 \\\\ Document\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getTextAnchor\n\nOptional. Provenance of the entity.\n\nText anchor indexing into the\n[Document.text](/php/docs/reference/cloud-document-ai/latest/V1.Document#_Google_Cloud_DocumentAI_V1_Document__getText__).\n\n### hasTextAnchor\n\n### clearTextAnchor\n\n### setTextAnchor\n\nOptional. Provenance of the entity.\n\nText anchor indexing into the\n[Document.text](/php/docs/reference/cloud-document-ai/latest/V1.Document#_Google_Cloud_DocumentAI_V1_Document__getText__).\n\n### getType\n\nRequired. Entity type from a schema e.g. `Address`.\n\n### setType\n\nRequired. Entity type from a schema e.g. `Address`.\n\n### getMentionText\n\nOptional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.\n\n### setMentionText\n\nOptional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.\n\n### getMentionId\n\nOptional. Deprecated. Use `id` field instead.\n\n### setMentionId\n\nOptional. Deprecated. Use `id` field instead.\n\n### getConfidence\n\nOptional. Confidence of detected Schema entity. Range `[0, 1]`.\n\n### setConfidence\n\nOptional. Confidence of detected Schema entity. Range `[0, 1]`.\n\n### getPageAnchor\n\nOptional. Represents the provenance of this entity wrt. the location on\nthe page where it was found.\n\n### hasPageAnchor\n\n### clearPageAnchor\n\n### setPageAnchor\n\nOptional. Represents the provenance of this entity wrt. the location on\nthe page where it was found.\n\n### getId\n\nOptional. Canonical id. This will be a unique value in the entity list\nfor this document.\n\n### setId\n\nOptional. Canonical id. This will be a unique value in the entity list\nfor this document.\n\n### getNormalizedValue\n\nOptional. Normalized entity value. Absent if the extracted value could\nnot be converted or the type (e.g. address) is not supported for certain\nparsers. This field is also only populated for certain supported document\ntypes.\n\n### hasNormalizedValue\n\n### clearNormalizedValue\n\n### setNormalizedValue\n\nOptional. Normalized entity value. Absent if the extracted value could\nnot be converted or the type (e.g. address) is not supported for certain\nparsers. This field is also only populated for certain supported document\ntypes.\n\n### getProperties\n\nOptional. Entities can be nested to form a hierarchical data structure\nrepresenting the content in the document.\n\n### setProperties\n\nOptional. Entities can be nested to form a hierarchical data structure\nrepresenting the content in the document.\n\n### getProvenance\n\nOptional. The history of this annotation.\n\n### hasProvenance\n\n### clearProvenance\n\n### setProvenance\n\nOptional. The history of this annotation.\n\n### getRedacted\n\nOptional. Whether the entity will be redacted for de-identification\npurposes.\n\n### setRedacted\n\nOptional. Whether the entity will be redacted for de-identification\npurposes.\n\n### getMethod\n\nOptional. Specifies how the entity's value is obtained.\n\n### setMethod\n\nOptional. Specifies how the entity's value is obtained."]]