Class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1Block
- Inherits:
-
Object
- Object
- Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1Block
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/vision_v1p1beta1/classes.rb,
generated/google/apis/vision_v1p1beta1/representations.rb,
generated/google/apis/vision_v1p1beta1/representations.rb
Overview
Logical element on the page.
Instance Attribute Summary collapse
-
#block_type ⇒ String
Detected block type (text, image etc) for this block.
-
#bounding_box ⇒ Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1BoundingPoly
A bounding polygon for the detected image annotation.
-
#confidence ⇒ Float
Confidence of the OCR results on the block.
-
#key_value_pair ⇒ Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1KeyValuePair
Proto for a key value pair.
-
#merged_text ⇒ String
All UTF-8 text detected in this block.
-
#paragraphs ⇒ Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1Paragraph>
List of paragraphs in this block (if this blocks is of type text).
-
#property ⇒ Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1TextAnnotationTextProperty
Additional information detected on the structural component.
-
#table ⇒ Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1Table
A table representation similar to HTML table structure.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudVisionV1p5beta1Block
constructor
A new instance of GoogleCloudVisionV1p5beta1Block.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ GoogleCloudVisionV1p5beta1Block
Returns a new instance of GoogleCloudVisionV1p5beta1Block
9484 9485 9486 |
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 9484 def initialize(**args) update!(**args) end |
Instance Attribute Details
#block_type ⇒ String
Detected block type (text, image etc) for this block.
Corresponds to the JSON property blockType
9445 9446 9447 |
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 9445 def block_type @block_type end |
#bounding_box ⇒ Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1BoundingPoly
A bounding polygon for the detected image annotation.
Corresponds to the JSON property boundingBox
9450 9451 9452 |
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 9450 def bounding_box @bounding_box end |
#confidence ⇒ Float
Confidence of the OCR results on the block. Range [0, 1].
Corresponds to the JSON property confidence
9455 9456 9457 |
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 9455 def confidence @confidence end |
#key_value_pair ⇒ Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1KeyValuePair
Proto for a key value pair.
Corresponds to the JSON property keyValuePair
9460 9461 9462 |
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 9460 def key_value_pair @key_value_pair end |
#merged_text ⇒ String
All UTF-8 text detected in this block. This field is by default not
returned unless specified in TextDetectionParams.block_filter or
DocumentParsingParams.block_filter.
Corresponds to the JSON property mergedText
9467 9468 9469 |
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 9467 def merged_text @merged_text end |
#paragraphs ⇒ Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1Paragraph>
List of paragraphs in this block (if this blocks is of type text).
Corresponds to the JSON property paragraphs
9472 9473 9474 |
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 9472 def paragraphs @paragraphs end |
#property ⇒ Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1TextAnnotationTextProperty
Additional information detected on the structural component.
Corresponds to the JSON property property
9477 9478 9479 |
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 9477 def property @property end |
#table ⇒ Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p5beta1Table
A table representation similar to HTML table structure.
Corresponds to the JSON property table
9482 9483 9484 |
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 9482 def table @table end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 |
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 9489 def update!(**args) @block_type = args[:block_type] if args.key?(:block_type) @bounding_box = args[:bounding_box] if args.key?(:bounding_box) @confidence = args[:confidence] if args.key?(:confidence) @key_value_pair = args[:key_value_pair] if args.key?(:key_value_pair) @merged_text = args[:merged_text] if args.key?(:merged_text) @paragraphs = args[:paragraphs] if args.key?(:paragraphs) @property = args[:property] if args.key?(:property) @table = args[:table] if args.key?(:table) end |