Version: latest
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
keyin 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.
- structure_fingerprint – Return a sha256 hex digest of the section tree of a document.
- unit_keys – Return a stable key for each table and figure.
- version_id – Return the id of one version of a document, as
HAS_PARTedges use it.
Attributes: