Class: Kreuzberg::ChunkingReasonOcrRequired

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

Overview

PDF requires OCR and is large.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#force_ocrObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



4385
4386
4387
# File 'lib/kreuzberg/native.rb', line 4385

def force_ocr
  @force_ocr
end

#page_countObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



4385
4386
4387
# File 'lib/kreuzberg/native.rb', line 4385

def page_count
  @page_count
end

Class Method Details

.from_hash(hash) ⇒ Object



4406
4407
4408
# File 'lib/kreuzberg/native.rb', line 4406

def self.from_hash(hash)
  new(page_count: hash[:page_count] || hash["page_count"], force_ocr: hash[:force_ocr] || hash["force_ocr"])
end

Instance Method Details

#large_and_many_pages?Boolean

Returns:

  • (Boolean)


4402
4403
4404
# File 'lib/kreuzberg/native.rb', line 4402

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

#large_file?Boolean

Returns:

  • (Boolean)


4396
# File 'lib/kreuzberg/native.rb', line 4396

def large_file? = false

#many_pages?Boolean

Returns:

  • (Boolean)


4398
# File 'lib/kreuzberg/native.rb', line 4398

def many_pages? = false

#ocr_required?Boolean

Returns:

  • (Boolean)


4400
# File 'lib/kreuzberg/native.rb', line 4400

def ocr_required? = true