Class: Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1Block

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GoogleCloudVisionV1p5beta1Block

Returns a new instance of GoogleCloudVisionV1p5beta1Block



8869
8870
8871
# File 'generated/google/apis/vision_v1/classes.rb', line 8869

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

Instance Attribute Details

#block_typeString

Detected block type (text, image etc) for this block. Corresponds to the JSON property blockType

Returns:

  • (String)


8830
8831
8832
# File 'generated/google/apis/vision_v1/classes.rb', line 8830

def block_type
  @block_type
end

#bounding_boxGoogle::Apis::VisionV1::GoogleCloudVisionV1p5beta1BoundingPoly

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



8835
8836
8837
# File 'generated/google/apis/vision_v1/classes.rb', line 8835

def bounding_box
  @bounding_box
end

#confidenceFloat

Confidence of the OCR results on the block. Range [0, 1]. Corresponds to the JSON property confidence

Returns:

  • (Float)


8840
8841
8842
# File 'generated/google/apis/vision_v1/classes.rb', line 8840

def confidence
  @confidence
end

#key_value_pairGoogle::Apis::VisionV1::GoogleCloudVisionV1p5beta1KeyValuePair

Proto for a key value pair. Corresponds to the JSON property keyValuePair



8845
8846
8847
# File 'generated/google/apis/vision_v1/classes.rb', line 8845

def key_value_pair
  @key_value_pair
end

#merged_textString

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

Returns:

  • (String)


8852
8853
8854
# File 'generated/google/apis/vision_v1/classes.rb', line 8852

def merged_text
  @merged_text
end

#paragraphsArray<Google::Apis::VisionV1::GoogleCloudVisionV1p5beta1Paragraph>

List of paragraphs in this block (if this blocks is of type text). Corresponds to the JSON property paragraphs



8857
8858
8859
# File 'generated/google/apis/vision_v1/classes.rb', line 8857

def paragraphs
  @paragraphs
end

#propertyGoogle::Apis::VisionV1::GoogleCloudVisionV1p5beta1TextAnnotationTextProperty

Additional information detected on the structural component. Corresponds to the JSON property property



8862
8863
8864
# File 'generated/google/apis/vision_v1/classes.rb', line 8862

def property
  @property
end

#tableGoogle::Apis::VisionV1::GoogleCloudVisionV1p5beta1Table

A table representation similar to HTML table structure. Corresponds to the JSON property table



8867
8868
8869
# File 'generated/google/apis/vision_v1/classes.rb', line 8867

def table
  @table
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
# File 'generated/google/apis/vision_v1/classes.rb', line 8874

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