database
database copied to clipboard
Inference does not properly handle subtypes, especially for multiple parent types
In our custom OWL ontology, we have defined the following type hierarchy (excerpt):
owl:Thing
Entity
Physical
Object
Agent
Robot
LbrArm
Lbr3
Lbr4
SelfConnectedObject
CorpuscularObject
Artifact
Device
Robot
LbrArm
Lbr3
Lbr4
Here Robot
shows up twice in the hierarchy, as it is defined as subtype of both Agent
and Device
:
<rdf:Description rdf:about="http://purl.org/ieee1872-owl/cora-bare#Robot">
<rdfs:subClassOf rdf:resource="http://purl.org/ieee1872-owl/sumo-cora#Agent"/>
<rdfs:subClassOf rdf:resource="http://purl.org/ieee1872-owl/sumo-cora#Device"/>
</rdf:Description>
Now I want to get all information about Lbr3
:
SELECT ?s ?p ?o
WHERE { <https://ontology.SHORTENED.de/SHORTENED#Lbr3> ?p ?o }
On my system, I get the following result:
s | p | o |
---|---|---|
rdf:type | rdfs:Class | |
rdf:type | owl:Class | |
rdfs:subClassOf | http://purl.org/ieee1872-owl/cora-bare#Robot | |
rdfs:subClassOf | https://ontology.SHORTENED.de/SHORTENED#LbrArm | |
rdfs:subClassOf | https://ontology.SHORTENED.de/SHORTENED#Lbr3 | |
rdfs:subClassOf | rdfs:Resource |
I would have expected that the result includes also subClassOf
entries for owl:Thing
, Entity
, Physical
, Object
, Agent
and Device
, but the entries stop at Robot
.
Related to this issue is when querying information about an instance of Lbr3
, named example_lbr
:
SELECT ?s ?p ?o
WHERE { <https://ontology.SHORTENED.de/SHORTENED#example_lbr> ?p ?o }
s | p | o |
---|---|---|
rdf:type | http://purl.org/ieee1872-owl/cora-bare#Robot | |
rdf:type | owl:NamedIndividual | |
rdf:type | https://ontology.SHORTENED.de/SHORTENED#LbrArm | |
rdf:type | https://ontology.SHORTENED.de/SHORTENED#Lbr3 | |
rdf:type | t744 | |
rdf:type | t752 |
The result shows two unnamed nodes (t744 and t752). I could imagine that these relate to Device
and Agent
. But what don't they have names and why are the types not listed up to Thing
?
Interestingly, a colleague of mine has the very same setup (including the *.properties file). For the same query
SELECT ?s ?p ?o
WHERE { <https://ontology.SHORTENED.de/SHORTENED#example_lbr> ?p ?o }
his result shows the full type hierarchy:
p | o |
---|---|
rdf:type | http://purl.org/ieee1872-owl/sumo-cora#Artifact |
rdf:type | http://purl.org/ieee1872-owl/sumo-cora#CorpuscularObject |
rdf:type | http://purl.org/ieee1872-owl/sumo-cora#Entity |
rdf:type | http://purl.org/ieee1872-owl/sumo-cora#Object |
rdf:type | http://purl.org/ieee1872-owl/sumo-cora#Physical |
rdf:type | http://purl.org/ieee1872-owl/sumo-cora#SelfConnectedObject |
rdf:type | http://purl.org/ieee1872-owl/cora-bare#Robot |
rdf:type | owl:NamedIndividual |
rdf:type | https://ontology.SHORTENED.de/SHORTENED#LbrArm |
rdf:type | https://ontology.SHORTENED.de/SHORTENED#Lbr3 |
rdf:type | t1053 |
rdf:type | t1122 |
So in summary, there are three issues here:
- on my setup, the inference regarding type hierarchy is not complete
- the inference for the same (what else could be different?) setup is inconsistent
- unions do not show up as named nodes