Meaning of owl:hasValue?

2020-07-27 05:01发布

What is the meaning of an owl:hasValue restriction, and how is it different from owl:allValuesFrom and owl:someValuesFrom?

In an ontology, I want to write an axiom that says, “Every body that has a diploma is literate.” How can I write this?

1条回答
一纸荒年 Trace。
2楼-- · 2020-07-27 05:41

Different types of restriction classes

Consider an individual x, a class C, a property P, and another individual y. Then there are a few class expressions that it sounds like you're concerned with:

someValuesFrom

An individual x is an element of the class ∃P.C if some individual y such that P(x,y) is an element of C. In Manchester syntax, ∃P.C is written as “P some C”.

allValuesFrom

An individual x is an element of the class ∀P.C if every every individual y such that P(x,y) is an element of C. In Manchester syntax ∀P.C is written as “P only C”.

hasValue

An individual x is an element of the class =P.y if it's the case that P(x,y). In Manchester syntax =P.y is written as “P value y”.

A version for datatype properties and object properies

In OWL, there are object properties that relate individuals to individuals, and datatype properties that relate individuals to literals. As a result, OWL actually has two types of restrictions for each of the constructions listed above: one for object properties and one for data properties. The meaning of each of these is laid out formally in 2.2.3 Class Expressions of the OWL 2 Web Ontology Language Direct Semantics (Second Edition) recommendation.

The diploma axiom

To write an OWL axiom expressing “every person that has a diploma is literate,” you'd need:

  • the classes LiterateThing, Person, Diploma
  • a property hasDiploma

The axiom would be

(Person ⊓ ∃hasDiploma.Diploma) ⊑ LiterateThing

This says that if an individual is a person, and has some diploma, then they are literate. In the RDF serialization of OWL (which is where you'd start to see the restriction classes like you mentioned), this looks like in the Protégé OWL editor, and in RDF/XML:

literacy axiom in Protégé

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns="http://example.org/literacy#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  <owl:Ontology rdf:about="http://example.org/literacy"/>
  <owl:Class>
    <rdfs:subClassOf>
      <owl:Class rdf:about="http://example.org/literacy#LiterateThing"/>
    </rdfs:subClassOf>
    <owl:intersectionOf rdf:parseType="Collection">
      <owl:Class rdf:about="http://example.org/literacy#Person"/>
      <owl:Restriction>
        <owl:onProperty>
          <owl:ObjectProperty rdf:about="http://example.org/literacy#hasDiploma"/>
        </owl:onProperty>
        <owl:someValuesFrom>
          <owl:Class rdf:about="http://example.org/literacy#Diploma"/>
        </owl:someValuesFrom>
      </owl:Restriction>
    </owl:intersectionOf>
  </owl:Class>
</rdf:RDF>
查看更多
登录 后发表回答