Class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentPageLayout

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/documentai_v1beta2/classes.rb,
lib/google/apis/documentai_v1beta2/representations.rb,
lib/google/apis/documentai_v1beta2/representations.rb

Overview

Visual element describing a layout unit on a page.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta1DocumentPageLayout

Returns a new instance of GoogleCloudDocumentaiV1beta1DocumentPageLayout.



2531
2532
2533
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2531

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#bounding_polyGoogle::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1BoundingPoly

A bounding polygon for the detected image annotation. Corresponds to the JSON property boundingPoly



2512
2513
2514
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2512

def bounding_poly
  @bounding_poly
end

#confidenceFloat

Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range [0, 1]. Corresponds to the JSON property confidence

Returns:

  • (Float)


2519
2520
2521
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2519

def confidence
  @confidence
end

#orientationString

Detected orientation for the Layout. Corresponds to the JSON property orientation

Returns:

  • (String)


2524
2525
2526
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2524

def orientation
  @orientation
end

#text_anchorGoogle::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor

Text reference indexing into the Document.text. Corresponds to the JSON property textAnchor



2529
2530
2531
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2529

def text_anchor
  @text_anchor
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2536
2537
2538
2539
2540
2541
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2536

def update!(**args)
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
  @confidence = args[:confidence] if args.key?(:confidence)
  @orientation = args[:orientation] if args.key?(:orientation)
  @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
end