简体   繁体   中英

How to define composition properties on Protege?

I develop an ontology with compositions as hasPart and partOf. I must use these properties for severals classes. So, I created theses properties without domain nor range and I use them by owl restrictions on classes. It is right ? Moreover, I read that partOf was transitive. Should I add transitive for hasPart too ?

Then, I defined hasPart as inverse of partOf. Should I define the inverse in hasPart too ?

Example :

    <owl:ObjectProperty rdf:about="&myontology;hasPart">
       <rdfs:label xml:lang="en">hasPart</rdfs:label>
       <rdfs:label xml:lang="fr">aCommePartie</rdfs:label>
     </owl:ObjectProperty>

    <owl:ObjectProperty rdf:about="&myontology;partOf">
       <rdf:type rdf:resource="&owl;TransitiveProperty"/>
       <rdfs:label xml:lang="en">partOf</rdfs:label>
       <rdfs:label xml:lang="fr">estPartieDe</rdfs:label>
       <owl:inverseOf rdf:resource="&excelfile;hasPart"/>
    </owl:ObjectProperty>

    <owl:Class rdf:about="&myontology;A">
       <rdfs:subClassOf>
           <owl:Restriction>
               <owl:onProperty rdf:resource="&myontology;hasPart"/>
               <owl:someValuesFrom rdf:resource="&myontology;B"/>
           </owl:Restriction>
       </rdfs:subClassOf>
    </owl:Class>

    <owl:Class rdf:about="&myontology;B">
       <rdfs:subClassOf>
           <owl:Restriction>
               <owl:onProperty rdf:resource="&myontology;partOf"/>
               <owl:someValuesFrom rdf:resource="&myontology;A"/>
           </owl:Restriction>
       </rdfs:subClassOf>
    </owl:Class>

I develop an ontology with compositions as hasPart and partOf. I must use these properties for severals classes. So, I created theses properties without domain nor range and I use them by owl restrictions on classes. It is right ? Moreover, I read that partOf was transitive. Should I add transitive for hasPart too ?

Whether or not partOf and hasPart are transitive or not is really a question of mereology . In some domains, they might be transitive, an in others they might not. You might well be interested in the W3C's draft, Simple part-whole relations in OWL Ontologies , about representing these types of relationships.

In any case, if you're using a reasoner, it should be sufficient to declare the inverse relationship in just one place. When you say that p is the inverse of q, you're saying that p(x,y) if and only if q(y,x), and since it's an if and only if relationship, you only need to say it once.

For transitivity, it might not be as clear, but you can infer that if a property p is transitive, then so is its inverse. Thus, if q is the inverse of p, and p is transitive, then so is q:

q(y,x)  q = inverse(p)  q(z,y)  q = inverse(p)
----------------------  -----------------------
      p(x,y)                  p(y,z)             transitive(p)
      --------------------------------------------------------
                   p(x,z)                                       q = inverse(p)
                   -----------------------------------------------------------
                                       q(z,x)

As an aside, you mentioned the term "composition" in the question. As I understand it, you mean that these are properties that indicate that something is composed of other things. The term composition also has another meaning in dealing with properties. Eg, the hasGrandparent property is the composition of the hasParent property with itself

hasGrandparent ≡ hasParent ∘ hasParent

Similarly, the hasUncle property is the composition of hasParent and hasBrother:

hasUncle ≡ hasParent ∘ hasBrother

(Note that this notation for composition is reversed from typical function composition notation, but it's standard in Protégé and OWL.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM