Class: Mindee::Parsing::Common::Ocr::Ocr
- Inherits:
-
Object
- Object
- Mindee::Parsing::Common::Ocr::Ocr
- Defined in:
- lib/mindee/parsing/common/ocr/ocr.rb
Overview
OCR extraction from the entire document.
Instance Attribute Summary collapse
-
#mvision_v1 ⇒ Mindee::Parsing::Common::Ocr::MVisionV1
readonly
Mindee Vision v1 results.
Instance Method Summary collapse
-
#initialize(prediction) ⇒ Ocr
constructor
A new instance of Ocr.
-
#reconstruct_vertically(coordinates, page_id, x_margin = 0.05) ⇒ Mindee::Parsing::Common::Ocr::OcrLine
Constructs a line from a column, located underneath given coordinates start.
- #to_s ⇒ String
Constructor Details
Instance Attribute Details
#mvision_v1 ⇒ Mindee::Parsing::Common::Ocr::MVisionV1 (readonly)
Mindee Vision v1 results.
155 156 157 |
# File 'lib/mindee/parsing/common/ocr/ocr.rb', line 155 def mvision_v1 @mvision_v1 end |
Instance Method Details
#reconstruct_vertically(coordinates, page_id, x_margin = 0.05) ⇒ Mindee::Parsing::Common::Ocr::OcrLine
Constructs a line from a column, located underneath given coordinates start
173 174 175 |
# File 'lib/mindee/parsing/common/ocr/ocr.rb', line 173 def reconstruct_vertically(coordinates, page_id, x_margin = 0.05) @mvision_v1.reconstruct_vertically(coordinates, page_id, x_margin) end |
#to_s ⇒ String
163 164 165 |
# File 'lib/mindee/parsing/common/ocr/ocr.rb', line 163 def to_s @mvision_v1.to_s end |