Why use owl:Restriction as own:EquivalenceClass

2019-03-30 23:54发布

I just start to learn Semantic Web and have a question about restriction class. I dug a while but haven't found any answer yet.. Any help would be much appreciated! From text book, I see examples of define restriction class, they are all about to define a anonymous owl:Restriction class bnode and link this bnode with property owl:equivalentClass.

example:

example:restrictionClass owl:equivalentClass [
    rdf:type owl:Restriction;
    owl:onProperty example:resProp;
    owl:someValuesFrom example:resValue.
]

My question is can we define a restriction class directly? Like:

 example:restrictionClass rdf:type owl:Restriction;
                         owl:onProperty example:resProp;
                         owl:someValuesFrom example:resValue.

What's the advantage to define anonymous owl:Restriction?

1条回答
冷血范
2楼-- · 2019-03-31 00:36

No, you can't. The RDF you're seeing is the encoding of the OWL axiom like: EquivalentClasses(C ObjectSomeValuesFrom(p D)). It gets encoded as:

:C owl:equivalentClass [
   rdf:type owl:Restriction;
   owl:onProperty :p;
   owl:someValuesFrom :D .
]

Now, suppose you also had the axiom EquivalentClasses(C ObjectSomeValuesFrom(r E)). That gets encoded as:

:C owl:equivalentClass [
   rdf:type owl:Restriction;
   owl:onProperty :r;
   owl:someValuesFrom :E .
]

Now, if you could apply the abbreviation that you want, you'd get:

:C rdf:type owl:Restriction ;
   owl:onProperty :p ;
   owl:onProperty :r ;
   owl:someValuesFrom :D ;
   owl:someValuesFrom :E .

Now there's ambiguity. Which of the following would C be equal to?

  • ObjectSomeValuesFrom(p D)
  • ObjectSomeValuesFrom(p E)
  • ObjectSomeValuesFrom(r D)
  • ObjectSomeValuesFrom(r E)

From the RDF alone, you don't have a way to tell. You actually need to encode the EquivalentClasses axioms.

Addendum

To address questions from the comments: I used C, p, and D to make the text shorter. Your original RDF snippet is the RDF encoding of the axiom

EquivalentClasses(
    example:restrictionClass
    ObjectSomeValuesFrom(example:resProp example:resValue)
)

That's what

example:restrictionClass owl:equivalentClass [
    rdf:type owl:Restriction;
    owl:onProperty example:resProp;
    owl:someValuesFrom example:resValue.
]

encodes. example:restrictionClass is the same IRI in both places. The entire blank node is the class expression ObjectSomeValuesFrom(example:resProp example:resValue). Then owl:equivalentClass just relates the two. Note that expressions aren't the same; the classes that they denote are the same. The mapping from OWL ontologies to RDF is given in OWL 2 Web Ontology Language: Mapping to RDF Graphs (Second Edition). Specifically, have a look at Table 1 in 2.1 Translation of Axioms without Annotations where you'll find the rules:

EquivalentClasses( CE1 ... CEn )
------------------------------------
T(CE1) owl:equivalentClass T(CE2) .
...
T(CEn-1) owl:equivalentClass T(CEn) . 

and

ObjectSomeValuesFrom( OPE CE )
------------------------------
_:x rdf:type owl:Restriction .
_:x owl:onProperty T(OPE) .
_:x owl:someValuesFrom T(CE) . 

When you go in the reverse direction, you can read in the RDF and reconstruct your axiom. But support that the mapping let you do the abbreviation that you're talking about, and you had two equivalent class axioms. You'd end up with ambiguous RDF, since you'd have two owl:onProperty triples, and two owl:someValuesFrom triples.

Maybe an example from arithmetic would help. We know that 4, 2+2, and 1+3 are all expressions that denote the same number. So we can have the axioms:

  • 4 = 2 + 2
  • 4 = 1 + 3

Now suppose that we encode that in RDF with something like:

:four :equals [ rdf:type :sum ; :left :two ; :right :two ] .
:four :equals [ rdf:type :sum ; :left :one ; :right :three ] .

That's nice, and we can reconstruct 4 = 2+2 and 4 = 1+3 from it. Now suppose we tried to move those properties to :four, rather than a blank node related by :equals. We'd end up with:

:four rdf:type :sum .
:four :left  :two .
:four :right :two .
:four :left  :one .
:four :right :three .

But what axioms is this supposed to represent? You have have four ways of picking a left and right from :four. Which of the following is it supposed to encode?

  • 4 = 2 + 2
  • 4 = 2 + 3
  • 4 = 1 + 2
  • 4 = 1 + 3
查看更多
登录 后发表回答