Class: Kreuzberg::Config::LayoutDetection
- Inherits:
-
Object
- Object
- Kreuzberg::Config::LayoutDetection
- Defined in:
- lib/kreuzberg/config.rb
Overview
Layout detection configuration
Instance Attribute Summary collapse
-
#apply_heuristics ⇒ Object
readonly
Returns the value of attribute apply_heuristics.
-
#confidence_threshold ⇒ Object
readonly
Returns the value of attribute confidence_threshold.
-
#table_model ⇒ Object
readonly
Returns the value of attribute table_model.
Instance Method Summary collapse
-
#initialize(confidence_threshold: nil, apply_heuristics: true, table_model: nil) ⇒ LayoutDetection
constructor
A new instance of LayoutDetection.
- #to_h ⇒ Object
Constructor Details
#initialize(confidence_threshold: nil, apply_heuristics: true, table_model: nil) ⇒ LayoutDetection
Returns a new instance of LayoutDetection.
908 909 910 911 912 |
# File 'lib/kreuzberg/config.rb', line 908 def initialize(confidence_threshold: nil, apply_heuristics: true, table_model: nil) @confidence_threshold = confidence_threshold&.to_f @apply_heuristics = apply_heuristics ? true : false @table_model = table_model&.to_s end |
Instance Attribute Details
#apply_heuristics ⇒ Object (readonly)
Returns the value of attribute apply_heuristics.
906 907 908 |
# File 'lib/kreuzberg/config.rb', line 906 def apply_heuristics @apply_heuristics end |
#confidence_threshold ⇒ Object (readonly)
Returns the value of attribute confidence_threshold.
906 907 908 |
# File 'lib/kreuzberg/config.rb', line 906 def confidence_threshold @confidence_threshold end |
#table_model ⇒ Object (readonly)
Returns the value of attribute table_model.
906 907 908 |
# File 'lib/kreuzberg/config.rb', line 906 def table_model @table_model end |
Instance Method Details
#to_h ⇒ Object
914 915 916 917 918 919 920 |
# File 'lib/kreuzberg/config.rb', line 914 def to_h { confidence_threshold: @confidence_threshold, apply_heuristics: @apply_heuristics, table_model: @table_model }.compact end |