Class: Mindee::V2::Product::OCR::OCRWord

Inherits:
Object
  • Object
show all
Defined in:
lib/mindee/v2/product/ocr/ocr_word.rb,
sig/mindee/v2/product/ocr/ocr_word.rbs

Overview

OCR result for a single word extracted from the document page.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server_response) ⇒ OCRWord



15
16
17
18
# File 'lib/mindee/v2/product/ocr/ocr_word.rb', line 15

def initialize(server_response)
  @content = server_response['content']
  @polygon = Mindee::Geometry::Polygon.new(server_response['polygon'])
end

Instance Attribute Details

#contentString (readonly)



10
11
12
# File 'lib/mindee/v2/product/ocr/ocr_word.rb', line 10

def content
  @content
end

#polygonMindee::Geometry::Polygon (readonly)



12
13
14
# File 'lib/mindee/v2/product/ocr/ocr_word.rb', line 12

def polygon
  @polygon
end

Instance Method Details

#to_sString

String representation.



22
23
24
# File 'lib/mindee/v2/product/ocr/ocr_word.rb', line 22

def to_s
  @content
end