Meaning of owl:hasValue?

自作多情 提交于 2019-12-23 03:33:10

问题


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:


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:

<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>


来源:https://stackoverflow.com/questions/21470449/meaning-of-owlhasvalue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!