Class: Xberg::OcrStrategyAuto

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
OcrStrategy
Defined in:
lib/xberg/native.rb

Overview

OCR only when the native text layer fails a quality check (default).

A scanner's invisible OCR sidecar passes that check, so scanned pages carrying one are extracted natively. Use [OcrStrategy::ScannedPages] to OCR them instead.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



502
503
504
# File 'lib/xberg/native.rb', line 502

def self.from_hash(hash)
  new
end

Instance Method Details

#auto?Boolean

Returns:

  • (Boolean)


496
# File 'lib/xberg/native.rb', line 496

def auto? = true

#scanned_pages?Boolean

Returns:

  • (Boolean)


498
499
500
# File 'lib/xberg/native.rb', line 498

def scanned_pages? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]