Class: Xberg::VlmFallbackPolicyOnLowQuality
- Inherits:
-
Data
- Object
- Data
- Xberg::VlmFallbackPolicyOnLowQuality
- Extended by:
- T::Sig
- Includes:
- VlmFallbackPolicy
- Defined in:
- lib/xberg/native.rb
Overview
Try the classical OCR backend first. If the quality score is below
quality_threshold, send the page to the VLM.
quality_threshold is in the [0.0, 1.0] range produced by
calculate_quality_score. A value of 0.5 is a
reasonable starting point; calibrate with the Stage 0 benchmark harness.
Instance Attribute Summary collapse
-
#quality_threshold ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#quality_threshold ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
289 290 291 |
# File 'lib/xberg/native.rb', line 289 def quality_threshold @quality_threshold end |
Class Method Details
.from_hash(hash) ⇒ Object
306 307 308 |
# File 'lib/xberg/native.rb', line 306 def self.from_hash(hash) new(quality_threshold: hash[:quality_threshold] || hash["quality_threshold"]) end |
Instance Method Details
#always? ⇒ Boolean
302 303 304 |
# File 'lib/xberg/native.rb', line 302 def always? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#disabled? ⇒ Boolean
298 |
# File 'lib/xberg/native.rb', line 298 def disabled? = false |
#on_low_quality? ⇒ Boolean
300 |
# File 'lib/xberg/native.rb', line 300 def on_low_quality? = true |