As said in the following topic, the problem is that HermiT does not export all inferrence performed through rules (although some may be exported). Takeing those inferrence into account requires to modify the source of HermiT, which is quite complex (although doable).
Hi, I am using the Pellet reasoner because HermiT complains that some rules use built-in atoms which aren't supported yet (I defined SWRL rules that create new object and data properties for my instances). Is this the same issue, or is it easier to access the inference result from the Pellet reasoner? I tried to dig into the debug output, but I am struggling to interpret it as it does not seem to output those instances that should be altered but rather a formatted full list of classes and instances in my OWL file? In Protege, the rules work fine and produce the expected result. Will the results be accessible through owlready2 at some point, or do I have to find another way? The stored tmp file created during the reasoning process didn't help much either..
I've tested some simple rules (see file below) with both HermiT and Pellet, and the inferences are properly obtained in Owlready (using the development version). The development version of Owlready also supports inferrence on property values (which may be done via SWRL rules).
Hey, thank you for the answer and the test file. To me it looks like I am doing something wrong when using owlready, as I have the same problem with your file. I can see the inference results in protege, but using owlready I can't access the inferred results. So maybe you can help me out here? What I do is:
I import owlready like this (I got this from some other forum entry):
from owlready2 import *
Everything looks fine so far, as it does not produce errors. But the output already indicates that the properties are ignored i.e. there is nothing shown that makes me think it inferred any kind of property, while it does show this, indicating that your rules are at least not completely ignored.
would give me a set containing the data property 'data_prop' and the object property 'prop' which is linked to obj, but it returns an empty set.
So I read, that the inference results are stored somewhere else (in http://inferrences/), but I don't know how to access it.
I tried to load it with get_ontology and executed the same query, but of course that did not work.
So maybe I simply have wrong expectations about my queries? Or how would I programmatically access the inferred information, that the individual 'e' now has a 'prop'='obj' and a 'data_prop'='true'?
thanks a lot, that helped. I can now properly infer property values from your owl file as well as my own. If I get that right, the current version only support the property values but not the data values, is that correct? I can imagine that inferring data values is a lot of effort, but is this currently under development?
in Hermit it doesn't work for me, as my SWRL rules contain built-in atoms (https://bitbucket.org/mareikep/materials-owl/src/master/materialsexample.owl), but Pellet works fine. In Protege, I can see both inferred properties (object and data) for the two individuals 100Cr13 and DistAB (the two swrl rules are supposed to determine the base unit of a given property and calculate the respective value for it, e.g. 1 kilometer = 1000 meters). But maybe I should mention, that I ticked everything under Reasoner -> Configure -> Displayed Inferences. However, if I find the time, I might have a look into the data property reasoning myself some time, but will nevertheless follow the developments in owlready2, hoping, that someone else does it ;)