Class: Datalab::OcrTextLine
- Inherits:
-
Object
- Object
- Datalab::OcrTextLine
- Defined in:
- lib/datalab/ocr_text_line.rb
Instance Method Summary collapse
- #bounding_polygon ⇒ Object
- #bounding_rectangle ⇒ Object
- #confidence ⇒ Object
-
#initialize(attributes) ⇒ OcrTextLine
constructor
A new instance of OcrTextLine.
- #text ⇒ Object
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_polygon ⇒ Object
15 16 17 |
# File 'lib/datalab/ocr_text_line.rb', line 15 def bounding_polygon @attributes[ :polygon ] end |
#bounding_rectangle ⇒ Object
19 20 21 |
# File 'lib/datalab/ocr_text_line.rb', line 19 def bounding_rectangle @attributes[ :image_bbox ] end |
#confidence ⇒ Object
11 12 13 |
# File 'lib/datalab/ocr_text_line.rb', line 11 def confidence @attributes[ :confidence ] end |
#text ⇒ Object
7 8 9 |
# File 'lib/datalab/ocr_text_line.rb', line 7 def text @attributes[ :text ] end |