本体属性之间的相等关系 [英] Equal relationship between ontology properties

查看:83
本文介绍了本体属性之间的相等关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个属性,例如'hasColor'和'hasFinish'.我想用本体表示,在本体类A的情况下,属性'hasColor'和'hasFinish'等于(owl:equivalentProperty).但是在本体类B的情况下,属性"hasColor"和"hasFinish"不相等.

I have 2 properties, e.g. 'hasColor' and 'hasFinish'. I want to express with ontology that in case of ontology class A are properties 'hasColor' and 'hasFinish' equal (owl:equivalentProperty). But in case of ontology class B the properties 'hasColor' and 'hasFinish' are NOT equal.

我该如何实现?

一种方法可能是使用类A作为范围来创建'hasColor'和'hasFinish'属性并将它们设置为相等.然后创建另一个"hasColor"和"hasFinish"属性,并将类B作为一个范围,并且没有相等的关系.但这是正确的方法吗?

One way probably is to create 'hasColor' and 'hasFinish' properties with class A as a range and set them to be equal. Then create another ones 'hasColor' and 'hasFinish' properties with class B as a range and without equal relationship. But is it right approach?

推荐答案

通过使两个属性 un 相等还不完全清楚您的意思.默认情况下,两个属性可以是不同的,因此您实际上不必做任何特殊的操作以使它们不相等.不过,如果问题得到澄清,也许可以添加更多有关此的信息.

It's not entirely clear yet what you mean by making two properties un-equal. By default, two properties can be distinct, so you don't really have to do anything special to let them be unequal. If the question is clarified, though, perhaps more information can be added about that.

例如,

∀ a,x. A(a)→ (hasFinish(a,x)⇔ hasColor(a,x))

∀a,x . A(a) → (hasFinish(a,x) ⇔ hasColor(a,x))

在OWL中

,但是您可以做到.如果要对所有类都这样说,可以使用owl:equivalentProperty.现在,当您说pr的等效属性时,您也可以说

in OWL, but you can do it. If you want to say this for all classes, you can, as you pointed out, use owl:equivalentProperty. Now, when you say that p is an equivalent property to r, you could also say that

p⊑ r
r⊑ p

p ⊑ r
r ⊑ p

,即pr中的每一个都是彼此的子属性.在OWL 2中(但不幸的是,不是Antoine Zimmermann在评论中指出的OWL 2 DL ),您可以断言给定的属性是的超级属性.属性,例如

that is, that each of p and r are subproperties of the other. In OWL 2 (but, unfortunately, not OWL 2 DL, as Antoine Zimmermann pointed out in the comments), you can assert that a given property is a superproperty of a chain of properties, e.g.,

有父亲• hasBrother⊑ hasUncle

hasFather • hasBrother ⊑ hasUncle

这表示,如果某人的父亲有一个兄弟,那么那个父亲的兄弟就是那个人的叔叔.

which says that if someone has a father who has a brother, then that father's brother is that person's uncle.

还有一个叫做rolification的概念,在 OWL 2 rolification 中有更详细的描述与某个类相对应的属性,该类将该类的每个个体与其自身相关联.对于您的 A 类,将存在一个 R A 关系,该关系将每个 A 与自身相关,并且仅相关这些实例.如果您再看一下

There's also a concept called rolification, which has been described more in OWL 2 rolification, which is the process of creating a property corresponding to a class that relates each individual of that class to itself. For you class A, there would be a relation RA that relates each A to itself, and only relates those instances. If you then look at a property chain like

R A • hasFinish

RA • hasFinish

您会注意到,它实际上是hasFinish的子属性,其中第一个参数是 A .这意味着您可以通过做出两个子属性断言来说hasFinish和hasColor对于A类是相同的 :

you'll notice that it's really the subproperty of hasFinish where the first argument is an A. This means that you can say that hasFinish and hasColor are the same for the class A by making two subproperty assertions:

R A • hasColor⊑ hasFinish
R A • hasFinish⊑ hasColor

RA • hasColor ⊑ hasFinish
RA • hasFinish ⊑ hasColor

这些假设A型个人是这些陈述的主题.如果A实际上是这里的范围,那么您只需使用

These assume that individuals of type A are the subjects of these statements. If A is actually the range here, then you'd just use

∀ a,x. A(a)→ (hasFinish(x,a)⇔ hasColor(x,a))
hasColor• R A ⊑ hasFinish
hasFinish• R A ⊑ hasColor

∀a,x . A(a) → (hasFinish(x,a) ⇔ hasColor(x,a))
hasColor • RA ⊑ hasFinish
hasFinish • RA ⊑ hasColor

要获取属性R A ,您需要添加定义

To get the property RA, you need to add the definition

A≡ ∃ R A .Self

到您的本体.在Protégé中,外观如下:

to your ontology. In Protégé, this would look like:

和由此产生的本体看起来像(在RDF/XML中):

and the resulting ontology looks like (in RDF/XML):

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns="http://example.org/ep#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  <owl:Ontology rdf:about="http://example.org/ep"/>
  <owl:Class rdf:about="http://example.org/ep#A">
    <owl:equivalentClass>
      <owl:Restriction>
        <owl:onProperty>
          <owl:ObjectProperty rdf:about="http://example.org/ep#R_A"/>
        </owl:onProperty>
        <owl:hasSelf rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
        >true</owl:hasSelf>
      </owl:Restriction>
    </owl:equivalentClass>
  </owl:Class>
  <owl:ObjectProperty rdf:about="http://example.org/ep#hasFinish">
    <owl:propertyChainAxiom rdf:parseType="Collection">
      <owl:ObjectProperty rdf:about="http://example.org/ep#R_A"/>
      <owl:ObjectProperty rdf:about="http://example.org/ep#hasColor"/>
    </owl:propertyChainAxiom>
  </owl:ObjectProperty>
  <owl:ObjectProperty rdf:about="http://example.org/ep#hasColor">
    <owl:propertyChainAxiom rdf:parseType="Collection">
      <owl:ObjectProperty rdf:about="http://example.org/ep#R_A"/>
      <owl:ObjectProperty rdf:about="http://example.org/ep#hasFinish"/>
    </owl:propertyChainAxiom>
  </owl:ObjectProperty>
</rdf:RDF>

和在Turtle中:

@prefix :      <http://example.org/ep#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

:hasFinish  a                   owl:ObjectProperty ;
        owl:propertyChainAxiom  ( :R_A :hasColor ) .

:A      a                    owl:Class ;
        owl:equivalentClass  [ a               owl:Restriction ;
                               owl:hasSelf     true ;
                               owl:onProperty  :R_A
                             ] .

:hasColor  a                    owl:ObjectProperty ;
        owl:propertyChainAxiom  ( :R_A :hasFinish ) .

<http://example.org/ep>
        a       owl:Ontology .

:R_A    a       owl:ObjectProperty .

这篇关于本体属性之间的相等关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆