简体   繁体   English

如何在Protege上定义合成属性?

[英]How to define composition properties on Protege?

I develop an ontology with compositions as hasPart and partOf. 我用hasPart和partOf组成了本体。 I must use these properties for severals classes. 我必须对somes类使用这些属性。 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. 而且,我读到partOf是可传递的。 Should I add transitive for hasPart too ? 我也应该为hasPart添加可传递的吗?

Then, I defined hasPart as inverse of partOf. 然后,我将hasPart定义为partOf的逆。 Should I define the inverse in hasPart too ? 我也应该在hasPart中定义逆吗?

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. 我用hasPart和partOf组成了本体。 I must use these properties for severals classes. 我必须对somes类使用这些属性。 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. 而且,我读到partOf是可传递的。 Should I add transitive for hasPart too ? 我也应该为hasPart添加可传递的吗?

Whether or not partOf and hasPart are transitive or not is really a question of mereology . 无论partOfhasPart是及物动词还是不实在的问题, 分体论 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. 您可能对W3C的草案“ OWL本体中的简单整体关系”很感兴趣,以表示这些类型的关系。

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. 当您说p是q的倒数时,您说的是p(x,y) 当且仅当 q(y,x),并且因为它是一个if和if的关系,所以您只需要说一次。

For transitivity, it might not be as clear, but you can infer that if a property p is transitive, then so is its inverse. 对于传递性,可能还不清楚,但是您可以推断出,如果属性p是传递性的,则其逆也是如此。 Thus, if q is the inverse of p, and p is transitive, then so is q: 因此,如果q是p的倒数,并且p是传递的,则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属性与其自身的组合

hasGrandparent ≡ hasParent ∘ hasParent hasGrandparent≡hasParent∘hasParent

Similarly, the hasUncle property is the composition of hasParent and hasBrother: 类似地,hasUncle属性是hasParent和hasBrother的组合物

hasUncle ≡ hasParent ∘ 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.) (请注意,这种组成表示法与典型的函数组成表示法相反,但是在Protégé和OWL中是标准的。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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