On 03/12/15 09:52, Dibyanshu Jaiswal wrote:
Hi Dave,

As described in my question, I experimented with a new ontology, and the
results are as expected. Hence, its got be some problem with my original
ontology.

OK, I may not have parsed your question correctly then.

Can you explain (or provide some link) by which you mean "virture of
domain/range inference from their properties." so that i can debug my
ontology. Since I belong to a corporate background, I'm not allowed to
share the ontology. 😑

I mean, for example, if you have some property:

  :p  rdfs:domain :B; rdfs:range xsd:string .

And then you have an individual:

  :a  rdfs:type :A;
     :p  "foo bar" .

Then the reasoner should deduce that :a is also of type :B because the domain statement on :p means that all things that have a :p property are within :B.

Similarly for rdfs:range statements.

Dave

On Thu, Dec 3, 2015 at 3:04 PM, Dave Reynolds <[email protected]>
wrote:

On 03/12/15 09:22, Dibyanshu Jaiswal wrote:

Say I have an Ontology (OWL file) with two classes A and B (siblings to
each other, under Thing) with instances A1,A2.. (rdf:type A)and B1,B2..
(rdf:type B)  respectively, along with some datatype and Object properties
with A as domain class and B as Range class.

On SPARQL Query

SELECT * WHERE {?ind rdf:type :A}
return me individuals of both A as well as B.. along with the object
properties.

Jena's Inbuilt Infernece Model linke this:

Reasoner reasoner = ReasonerRegistry.getRDFSReasoner();
InfModel infModel = ModelFactory.createInfModel(reasoner, ontModel);


As per my expectations I should get a list of individuals which are of
rdf:type A or rdf:type (subclasses of A)


The chances are those individuals appearing in the SPARQL result which you
believe to be of type B are *also* of type A by virtue of domain/range
inference from their properties.

If you can't spot the problem then isolate a small test case, e.g.
starting with one problem individual and expand from there. If you have a
small test case but still can't see why those inferences are cropping up
then you have something small enough to post to see if others can help you
diagnose.

Dave





Reply via email to