Class: Datalab::OcrTextLine

Inherits:
Object
  • Object
show all
Defined in:
lib/datalab/ocr_text_line.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ OcrTextLine

Returns a new instance of OcrTextLine.



3
4
5
# File 'lib/datalab/ocr_text_line.rb', line 3

def initialize( attributes )
  @attributes = attributes&.dup || {}
end

Instance Method Details

#bounding_polygonObject



15
16
17
# File 'lib/datalab/ocr_text_line.rb', line 15

def bounding_polygon
  @attributes[ :polygon ]
end

#bounding_rectangleObject



19
20
21
# File 'lib/datalab/ocr_text_line.rb', line 19

def bounding_rectangle 
  @attributes[ :image_bbox ]
end

#confidenceObject



11
12
13
# File 'lib/datalab/ocr_text_line.rb', line 11

def confidence
  @attributes[ :confidence ]
end

#textObject



7
8
9
# File 'lib/datalab/ocr_text_line.rb', line 7

def text 
  @attributes[ :text ]
end