class Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentEntity

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

Attributes

confidence[RW]

Optional. Confidence of detected Schema entity. Range [0, 1]. Corresponds to the JSON property `confidence` @return [Float]

id[RW]

Optional. Canonical id. This will be a unique value in the entity list for this document. Corresponds to the JSON property `id` @return [String]

mention_id[RW]

Optional. Deprecated. Use `id` field instead. Corresponds to the JSON property `mentionId` @return [String]

mention_text[RW]

Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty. Corresponds to the JSON property `mentionText` @return [String]

normalized_value[RW]

Parsed and normalized entity value. Corresponds to the JSON property `normalizedValue` @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentEntityNormalizedValue]

page_anchor[RW]

Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types. Corresponds to the JSON property `pageAnchor` @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentPageAnchor]

properties[RW]

Optional. Entities can be nested to form a hierarchical data structure representing the content in the document. Corresponds to the JSON property `properties` @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentEntity>]

provenance[RW]

Structure to identify provenance relationships between annotations in different revisions. Corresponds to the JSON property `provenance` @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentProvenance]

redacted[RW]

Optional. Whether the entity will be redacted for de-identification purposes. Corresponds to the JSON property `redacted` @return [Boolean]

redacted?[RW]

Optional. Whether the entity will be redacted for de-identification purposes. Corresponds to the JSON property `redacted` @return [Boolean]

text_anchor[RW]

Text reference indexing into the Document.text. Corresponds to the JSON property `textAnchor` @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentTextAnchor]

type[RW]

Entity type from a schema e.g. `Address`. Corresponds to the JSON property `type` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/documentai_v1beta3/classes.rb, line 5107
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/documentai_v1beta3/classes.rb, line 5112
def update!(**args)
  @confidence = args[:confidence] if args.key?(:confidence)
  @id = args[:id] if args.key?(:id)
  @mention_id = args[:mention_id] if args.key?(:mention_id)
  @mention_text = args[:mention_text] if args.key?(:mention_text)
  @normalized_value = args[:normalized_value] if args.key?(:normalized_value)
  @page_anchor = args[:page_anchor] if args.key?(:page_anchor)
  @properties = args[:properties] if args.key?(:properties)
  @provenance = args[:provenance] if args.key?(:provenance)
  @redacted = args[:redacted] if args.key?(:redacted)
  @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
  @type = args[:type] if args.key?(:type)
end