- From: David Booth <david@dbooth.org>
- Date: Wed, 06 May 2015 10:29:05 -0400
- To: public-owl-wg@w3.org
- CC: Eric Prud'hommeaux <eric@w3.org>, Anthony Mallia <amallia@edmondsci.com>, Bijan Parsia <bparsia@cs.man.ac.uk>, Grahame Grieve <grahameg@gmail.com>
FYI, Bijan Parsia kindly provided the following answer, reposted with his permission. Tony (or Eric) can you please try it with hasSSN declared as functional and see what you get? Also please try making it *inverse* functional, since I think that would be the more normal case. Thanks, David -------- Forwarded Message -------- Subject: Re: Blank nodes and OWL reasoning: inherent problem or tool limitation? Date: Wed, 6 May 2015 14:51:08 +0100 From: Bijan Parsia <bparsia@cs.man.ac.uk> To: David Booth <david@dbooth.org> CC: Jim Hendler <hendler@cs.rpi.edu> Hi ho, Blank nodes definitely are tricky in OWL. Semantically, they are existential variables. So: :x :loves _:y. Is the same as: :x rdf:type [someValuesFrom owl:Thing; onProperty :loves]. In order to retain decidability, OWL DL has pretty specific restrictions on the permissible pattern of existential (some are enforced by the variable free syntax). Furthermore, bnodes are used in the syntax of expressions as well. Hence more restrictions :) Finally, qua existential variables, they are subject to renaming. So: :x :loves _:y. :x :loves _:x. Is the same as: :x :loves _:y. That is, for arbitrary bnodes _:y, _:z there’s no even hint that they are distinct. SPARQL (in default entailment regime), basically treats them as names and returns them as such. Finally, there’s the question of variable bindings. In generally, in DL instance retrieval, we only retrieve *named* individuals. But a very quick glance (without testing), shows that the problem the last. If you make hasSSN functional, then you should be able to infer that frank has at least two children. Cheers, Bijan. On 05/05/2015 02:25 PM, David Booth wrote: > We are working on an RDF representation and ontology for FHIR (a new > healthcare data standard) > http://wiki.hl7.org/index.php?title=FHIR > and in some cases the most natural RDF to generate would involve blank > nodes for some nodes instead of URIs. However, we are noticing that > this is causing (at least some) OWL reasoners to fail to classify those > nodes as we would like. The problem goes away if we use a URI instead > of a blank node. > > Is this an inherent feature of OWL reasoners or a limitation of specific > tools? > > For example, in the turtle below, a DLQuery "hasSSN some xsd:string" > returns 1 instance: frankson. In contrast, a SPARQL query > prefix : <http://BlankNodeTest/> > SELECT ?subject ?object > WHERE { ?subject :hasSSN ?object }" > returns the desired 2 solutions. Notice the two children of :frank in > the following example Turtle: > > [[ > @prefix : <http://BlankNodeTest/> . > @prefix owl: <http://www.w3.org/2002/07/owl#> . > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . > @prefix xml: <http://www.w3.org/XML/1998/namespace> . > @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . > @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . > @base <http://BlankNodeTest> . > > <http://BlankNodeTest> a owl:Ontology . > > :hasChild a owl:AsymmetricProperty , owl:ObjectProperty . > > :hasHairColor a owl:ObjectProperty ; > rdfs:range :HairColor . > > # :hasSSN a owl:ObjectProperty . > :hasSSN a owl:DatatypeProperty . > :value a owl:DatatypeProperty . > > :code a owl:Class . > :HairColor a owl:Class ; rdfs:subClassOf :code . > > :BrownHaired a owl:Class ; > owl:equivalentClass [ > a owl:Class ; > owl:intersectionOf ( > :HairColor > [ owl:onProperty :value ; owl:hasValue "brown" ] > ) > ] ; > rdfs:subClassOf :HairColor . > > :brown1 a :HairColor , owl:NamedIndividual ; > :value "brown" . > > :Person a owl:Class . > > :frank a :Person , owl:NamedIndividual ; > :hasChild > [ > a :Person ; > :hasSSN "123-45-6789" ; > :hasHairColor [ > a :HairColor ; > :value "brown" > ] > ], :frankson . > > :frankson > a :Person ; > :hasSSN "123-45-6790" ; > :hasHairColor [ > a :HairColor ; > :value "brown" > ] > . > ]] > > Thanks, > David Booth > >
Received on Wednesday, 6 May 2015 14:29:37 UTC