Skip to main content
Version: 0.0.5 (stable)

agrag.common.data_models.structure

Stable keys, node ids, reading order and ancestry for the sections of a Document.

Functions:

  • ancestors – Return the index of a section and of each section above it.
  • chunk_id – Return the id of a chunk.
  • common_ancestor – Return the lowest section that contains all the given sections.
  • heading_paths – Return the non-empty headings from the top to each section.
  • node_id – Return the id of the node that holds key in one document version.
  • reading_positions – Number every heading and unit of a document in reading order.
  • section_keys – Return one stable key for each section.
  • source_node_id – Return the id of the Source node for a file.
  • unit_keys – Return a stable key for each table and figure.
  • version_id – Return the id of one version of a document, as HAS_PART edges use it.

Attributes: