RDFLib / OWL-RL

A simple implementation of the OWL2 RL Profile on top of RDFLib: it expands the graph with all possible triples that OWL RL defines. It can be used together with RDFLib to expand an RDFLib Graph object, or as a stand alone service with its own serialization.
http://www.ivan-herman.net/Misc/2008/owlrl/
Other
144 stars 30 forks source link

Create inferred triples in a NAMED graph #42

Open anatoly-scherbakov opened 3 years ago

anatoly-scherbakov commented 3 years ago

When using an rdflib.ConjunctiveGraph, OWL-RL creates its inferred triples in the default, unnamed graph.

Is it possible to create them in a specific named graph instead, if so requested by the user?

anatoly-scherbakov commented 3 years ago

I came up with something: https://github.com/octadocs/octadocs/blob/master/octadocs/octiron/owlrl_named_graph.py

Usage: https://github.com/octadocs/octadocs/blob/master/octadocs/octiron/inference.py#L15

But this won't work with rdflib 6.0.0. I haven't yet ascertained why, but no inferences at all are being drawn. For now, I am sticking to rdflib 5.0.0.