Replies: 1 comment 1 reply
-
Thank you for using Oxigraph. Sadly rdflib does not support RDF-star and rdflib API makes hard to swap rdflib parsers with Oxigraph parsers that do support RDF-star. However, you can hack a bit with code like: store = oxrdflib.OxigraphStore()
graph = rdflib.Graph(store=store) # Build the rdflib Graph object backed by the oxigraph store, you can also use ConjunctiveGraph or Dataset
store_inner.load(MY_FILE.ttl, "text/turtle", to_graph=pyoxigraph.BlankNode(graph.identifier)) # Loads the turtle file with Oxigraph parser supporting RDF-star, the `to_graph` parameter is here because rdflib expects the graph triples to be in the name graph. Beware, if you use a custom identifier, it might be a NamedNode and not a BlankNode
# The graph should contains the loaded RDF-star triples Note that I have not tested it, syntax might be slightly wrong and accessing the data after loading might also fail. If you have the option I would suggest to use directly pyoxigraph instead. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to know if oxrdflib currently supports reading and writing of rdf-star(quoted triple) turtle files with Python? If so, how should I do it?
Beta Was this translation helpful? Give feedback.
All reactions