Class: Kreuzberg::DocumentNode

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/kreuzberg/types.rb

Overview

Single node in the document structure tree.

Represents a logical unit of content with deterministic ID, content, tree structure information, and metadata.

Examples:

node = Kreuzberg::DocumentNode.new(
  id: "node-abc123",
  content: "This is the content",
  parent: nil,
  children: [],
  content_layer: "body",
  page: 1,
  page_end: 1,
  bbox: bbox,
  annotations: []
)