Closed fils closed 1 year ago
OK.. I remembered..
# load quad graph
g = ConjunctiveGraph()
g.parse("http://ossapi.oceaninfohub.org/public/graphs/summonedobis_v1_release.nq", format="nquads")
print(len(g))
kg = kglab.KnowledgeGraph(name = "OIH test", base_uri = "https://oceaninfohub.org/id/", namespaces = namespaces, import_graph = g)
but is there a way to declare this when initializing a new kglab.KnowledgeGraph? Or is the recommendation to use rdflib Conjunctive as an import?
I'm submitting a
Current Behaviour:
Can't see an obvious path to loading nquads
Expected Behaviour:
Be able to load nquads into an rdflib Graph or, if required rdflib.Dataset. However, just converting from nquads to ntriples would really be fine for my use case. However, having named groups would be nice. I do see the named graphs (multi-graph / ConjunctiveGraph support in rdflib) Curious how to leverage with the kglab abstractions
Steps to reproduce:
code below
Environment:
Code example
this seems to work, but
gives
Looking at https://rdflib.readthedocs.io/en/stable/intro_to_parsing.html it would seem I could leverage named graphs with
reviewing https://derwen.ai/docs/kgl/ref/ it seems this support is in there. So I am curious what syntax I am missing to leverage this.