Skip to main content

Module shacl_convert

Module shacl_convert 

Source
Expand description

OWL → SHACL conversion for QualiaDB ontology alignment.

RadLex and DICOM healthcare vocabularies arrive as OWL (RDF/XML or Turtle/N3). The Webizen Sentinel consumes SHACL, not OWL classifiers directly. This module lowers OWL axioms into sh:NodeShape graphs while preserving the agency invariant: q42:Principal may have q42:Thing possessions but is not itself a Thing.

Structs§

HealthcareOwlModel
RadlexRelation

Enums§

OwlToShaclError

Constants§

SHAPE_PREFIXES
Prefixes emitted on every generated shapes file.

Functions§

healthcare_owl_to_shacl_ttl
Emit SHACL node shapes for healthcare IE.* classes and DICOM-tag properties.
parse_healthcare_owl
Parse healthcare OWL from .n3 or .ttl.
parse_healthcare_owl_lines
Line-oriented parser for healthcare vocab exports (handles truncated tails and unionOf domains).
parse_healthcare_owl_n3
Parse .n3 healthcare excerpt (OWL in Notation3/Turtle syntax; tolerates truncated exports).
parse_healthcare_owl_turtle
Parse Turtle healthcare vocabulary.
parse_radlex_relations_xml
Stream-parse RadLex Pun OWL (RDF/XML) relation axioms (RID:Part_Of, RID:Has_Part, …).
radlex_relations_to_shacl_ttl
Group RadLex relations by subject RID and emit SHACL node shapes.
write_anatomy_shape_bundle
Write agency baseline + converted ontologies to an output directory.