Class: Xberg::NoChunkingReasonTextLayerDetected

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

Overview

PDF has substantial text layer (OCR not needed).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#avg_chars_per_pageObject (readonly)

Returns the value of attribute avg_chars_per_page

Returns:

  • (Object)

    the current value of avg_chars_per_page



3093
3094
3095
# File 'lib/xberg/native.rb', line 3093

def avg_chars_per_page
  @avg_chars_per_page
end

#text_coverageObject (readonly)

Returns the value of attribute text_coverage

Returns:

  • (Object)

    the current value of text_coverage



3093
3094
3095
# File 'lib/xberg/native.rb', line 3093

def text_coverage
  @text_coverage
end

Class Method Details

.from_hash(hash) ⇒ Object



3118
3119
3120
3121
3122
3123
# File 'lib/xberg/native.rb', line 3118

def self.from_hash(hash)
  new(
    text_coverage: hash[:text_coverage] || hash["text_coverage"],
    avg_chars_per_page: hash[:avg_chars_per_page] || hash["avg_chars_per_page"]
  )
end

Instance Method Details

#chunking_disabled?Boolean

Returns:

  • (Boolean)


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

def chunking_disabled? = false

#fast_text_extraction?Boolean

Returns:

  • (Boolean)


3114
3115
3116
# File 'lib/xberg/native.rb', line 3114

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

#few_pages?Boolean

Returns:

  • (Boolean)


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

def few_pages? = false

#format_not_chunkable?Boolean

Returns:

  • (Boolean)


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

def format_not_chunkable? = false

#small_file?Boolean

Returns:

  • (Boolean)


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

def small_file? = false

#text_layer_detected?Boolean

Returns:

  • (Boolean)


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

def text_layer_detected? = true