Skip to main content

Module ontology_loader

Module ontology_loader 

Source
Expand description

Startup ontology loader โ€” parses bundled Turtle/N-Triples ontology files into NQuins and seeds the daemon graph at startup.

Ontology files are resolved in priority order:

  1. $QUALIA_ONTOLOGY_PATH/ environment variable if set
  2. ontologies/ relative to the current working directory (dev / workspace layout)
  3. Alongside the binary: <exe-dir>/ontologies/

Any file that cannot be read or parsed emits a log warning and is skipped โ€” the daemon starts successfully even if ontology files are absent.

Functionsยง

load_q42_file
Load a unified .q42 volume ontology file.
load_startup_ontologies
Load all startup ontologies into the daemon graph.
ontology_dir_path
Resolved ontologies directory, if present on disk.
parse_ttl_to_quins
Parse a single Turtle file into NQuins, all placed in graph_context.
startup_ontology_catalog
Startup ontology catalog: (filename, named_graph_context_hash).