axiom.axiomatize ================ .. py:module:: axiom.axiomatize .. autoapi-nested-parse:: Lift supported RDF graph patterns into structural elements. The public entry point is :func:`axiomatize`, which partitions a graph into the currently implemented ``StructuralElement`` models. The implementation uses RDFLib graph triple-pattern lookup rather than SPARQL or a secondary in-memory index. Exceptions ---------- .. autoapisummary:: axiom.axiomatize.AxiomatizationError axiom.axiomatize.UnsupportedGraphError axiom.axiomatize.MalformedGraphError Functions --------- .. autoapisummary:: axiom.axiomatize.axiomatize Module Contents --------------- .. py:exception:: AxiomatizationError Bases: :py:obj:`ValueError` Base class for graph-to-structural-element lifting errors. .. py:exception:: UnsupportedGraphError Bases: :py:obj:`AxiomatizationError` Raised when graph content is outside the supported v1 axiomatization. .. py:exception:: MalformedGraphError Bases: :py:obj:`AxiomatizationError` Raised when a recognized supported pattern has an invalid RDF shape. .. py:function:: axiomatize(graph: rdflib.Graph) -> tuple[axiom.structural_element.StructuralElement, Ellipsis] Lift supported RDF graph patterns from ``graph`` into structural elements. The caller is expected not to mutate ``graph`` while axiomatization is in progress. V1 is strict: any initial input triple that cannot be assigned to a currently supported structural element causes ``UnsupportedGraphError``.