owlready2 reasoner does not generate inferred object property assertions with a SWRL rule

664 views Asked by At

Suppose an OWL ontology contains the following SWRL rule:

has_part(?x, ?y) ^ participates(?x, ?z) -> participates(?y, ?z)

and following object property assertions:

o1 has_part o2
o1 participates p1

When I run the Hermit reasoner in Protege, I obtain the following inferred object property assertion:

o2 participates p1

However, when I load the same ontology with owlready2 and run its Hermit reasoner, I do not get any inferred object property assertion. For example:

from owlready2 import *

onto = get_ontology("test.owl").load()
sync_reasoner()
onto.o2.get_properties()

does not return any properties.

I did save the ontology in the RDFXML format and I can retrieve the SWRL rule with owlready2.

Does owlready2 reasoner not support this kind of inference?

1

There are 1 answers

0
HMCheong On

Solution: sync_reasoner(infer_property_values = True)