Class: Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1Block
- Inherits:
-
Object
- Object
- Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1Block
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/vision_v1/classes.rb,
generated/google/apis/vision_v1/representations.rb,
generated/google/apis/vision_v1/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::VisionV1::GoogleCloudVisionV1p5beta1BoundingPoly
A bounding polygon for the detected image annotation.
-
#confidence ⇒ Float
Confidence of the OCR results on the block.
-
#key_value_pair ⇒ Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1KeyValuePair
Proto for a key value pair.
-
#merged_text ⇒ String
All UTF-8 text detected in this block.
-
#paragraphs ⇒ Array<Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1Paragraph>
List of paragraphs in this block (if this blocks is of type text).
-
#property ⇒ Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1TextAnnotationTextProperty
Additional information detected on the structural component.
-
#table ⇒ Google::Apis::VisionV1::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
9293 9294 9295 |
# File 'generated/google/apis/vision_v1/classes.rb', line 9293 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
9254 9255 9256 |
# File 'generated/google/apis/vision_v1/classes.rb', line 9254 def block_type @block_type end |
#bounding_box ⇒ Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1BoundingPoly
A bounding polygon for the detected image annotation.
Corresponds to the JSON property boundingBox
9259 9260 9261 |
# File 'generated/google/apis/vision_v1/classes.rb', line 9259 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
9264 9265 9266 |
# File 'generated/google/apis/vision_v1/classes.rb', line 9264 def confidence @confidence end |
#key_value_pair ⇒ Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1KeyValuePair
Proto for a key value pair.
Corresponds to the JSON property keyValuePair
9269 9270 9271 |
# File 'generated/google/apis/vision_v1/classes.rb', line 9269 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
9276 9277 9278 |
# File 'generated/google/apis/vision_v1/classes.rb', line 9276 def merged_text @merged_text end |
#paragraphs ⇒ Array<Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1Paragraph>
List of paragraphs in this block (if this blocks is of type text).
Corresponds to the JSON property paragraphs
9281 9282 9283 |
# File 'generated/google/apis/vision_v1/classes.rb', line 9281 def paragraphs @paragraphs end |
#property ⇒ Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1TextAnnotationTextProperty
Additional information detected on the structural component.
Corresponds to the JSON property property
9286 9287 9288 |
# File 'generated/google/apis/vision_v1/classes.rb', line 9286 def property @property end |
#table ⇒ Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1Table
A table representation similar to HTML table structure.
Corresponds to the JSON property table
9291 9292 9293 |
# File 'generated/google/apis/vision_v1/classes.rb', line 9291 def table @table end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 |
# File 'generated/google/apis/vision_v1/classes.rb', line 9298 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 |