Class: Kreuzberg::Result::HierarchicalBlock
- Inherits:
-
Struct
- Object
- Struct
- Kreuzberg::Result::HierarchicalBlock
- Defined in:
- lib/kreuzberg/result.rb
Instance Attribute Summary collapse
-
#bbox ⇒ Array<Float>?
readonly
Bounding box (left, top, right, bottom).
-
#content ⇒ String
readonly
Text content for this page.
-
#font_size ⇒ Float
readonly
The font size of the text.
-
#images ⇒ Array<Image>
readonly
Images on this page.
-
#level ⇒ String
readonly
The hierarchy level (h1-h6 or body).
-
#page_number ⇒ Integer
readonly
Page number (1-indexed).
-
#tables ⇒ Array<Table>
readonly
Tables on this page.
-
#text ⇒ String
readonly
The text content of this block.
Instance Method Summary collapse
Instance Attribute Details
#bbox ⇒ Array<Float>? (readonly)
Returns Bounding box (left, top, right, bottom).
122 123 124 125 126 |
# File 'lib/kreuzberg/result.rb', line 122 HierarchicalBlock = Struct.new(:text, :font_size, :level, :bbox) do def to_h { text: text, font_size: font_size, level: level, bbox: bbox } end end |
#content ⇒ String (readonly)
Returns Text content for this page.
122 123 124 125 126 |
# File 'lib/kreuzberg/result.rb', line 122 HierarchicalBlock = Struct.new(:text, :font_size, :level, :bbox) do def to_h { text: text, font_size: font_size, level: level, bbox: bbox } end end |
#font_size ⇒ Float (readonly)
Returns The font size of the text.
122 123 124 125 126 |
# File 'lib/kreuzberg/result.rb', line 122 HierarchicalBlock = Struct.new(:text, :font_size, :level, :bbox) do def to_h { text: text, font_size: font_size, level: level, bbox: bbox } end end |
#images ⇒ Array<Image> (readonly)
Returns Images on this page.
122 123 124 125 126 |
# File 'lib/kreuzberg/result.rb', line 122 HierarchicalBlock = Struct.new(:text, :font_size, :level, :bbox) do def to_h { text: text, font_size: font_size, level: level, bbox: bbox } end end |
#level ⇒ String (readonly)
Returns The hierarchy level (h1-h6 or body).
122 123 124 125 126 |
# File 'lib/kreuzberg/result.rb', line 122 HierarchicalBlock = Struct.new(:text, :font_size, :level, :bbox) do def to_h { text: text, font_size: font_size, level: level, bbox: bbox } end end |
#page_number ⇒ Integer (readonly)
Returns Page number (1-indexed).
122 123 124 125 126 |
# File 'lib/kreuzberg/result.rb', line 122 HierarchicalBlock = Struct.new(:text, :font_size, :level, :bbox) do def to_h { text: text, font_size: font_size, level: level, bbox: bbox } end end |
#tables ⇒ Array<Table> (readonly)
Returns Tables on this page.
122 123 124 125 126 |
# File 'lib/kreuzberg/result.rb', line 122 HierarchicalBlock = Struct.new(:text, :font_size, :level, :bbox) do def to_h { text: text, font_size: font_size, level: level, bbox: bbox } end end |
#text ⇒ String (readonly)
Returns The text content of this block.
122 123 124 125 126 |
# File 'lib/kreuzberg/result.rb', line 122 HierarchicalBlock = Struct.new(:text, :font_size, :level, :bbox) do def to_h { text: text, font_size: font_size, level: level, bbox: bbox } end end |
Instance Method Details
#to_h ⇒ Object
123 124 125 |
# File 'lib/kreuzberg/result.rb', line 123 def to_h { text: text, font_size: font_size, level: level, bbox: bbox } end |