Class: Mindee::Parsing::Common::Extras::FullTextOCRExtra
- Inherits:
- 
      Object
      
        - Object
- Mindee::Parsing::Common::Extras::FullTextOCRExtra
 
- Defined in:
- lib/mindee/parsing/common/extras/full_text_ocr_extra.rb
Overview
Full Text OCR result.
Instance Attribute Summary collapse
- 
  
    
      #contents  ⇒ String? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Contents of the full text OCR result. 
- 
  
    
      #language  ⇒ String? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Language used on the page. 
Instance Method Summary collapse
- 
  
    
      #initialize(raw_prediction)  ⇒ FullTextOCRExtra 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of FullTextOCRExtra. 
- #to_s ⇒ String
Constructor Details
#initialize(raw_prediction) ⇒ FullTextOCRExtra
Returns a new instance of FullTextOCRExtra.
| 18 19 20 21 22 23 | # File 'lib/mindee/parsing/common/extras/full_text_ocr_extra.rb', line 18 def initialize(raw_prediction) @contents = raw_prediction['content'] if raw_prediction['content'] return unless raw_prediction['language'] @language = raw_prediction['language'] end | 
Instance Attribute Details
#contents ⇒ String? (readonly)
Contents of the full text OCR result.
| 13 14 15 | # File 'lib/mindee/parsing/common/extras/full_text_ocr_extra.rb', line 13 def contents @contents end | 
#language ⇒ String? (readonly)
Language used on the page.
| 16 17 18 | # File 'lib/mindee/parsing/common/extras/full_text_ocr_extra.rb', line 16 def language @language end | 
Instance Method Details
#to_s ⇒ String
| 26 27 28 | # File 'lib/mindee/parsing/common/extras/full_text_ocr_extra.rb', line 26 def to_s @contents || '' end |