kg = py`from os.path import dirname
import os
import io
namespaces = {
"foaf": "http://xmlns.com/foaf/0.1/",
"gorm": "http://example.org/sagas#",
"rel": "http://purl.org/vocab/relationship/",
}
kg = ${kglab}.KnowledgeGraph(
name = "Happy Vikings KG example for SKOS/OWL inference",
namespaces=namespaces,
)
with open("gorm.ttl", "wb") as f:
f.write(${await kgzip
.file("kglab-main/dat/gorm.ttl")
.arrayBuffer()}.tobytes())
kg.load_rdf("gorm.ttl")
kg`