在OWL中的相同属性中定义多个域/范围 [英] Define mutiple domains/ranges in a same propery in OWL

查看:157
本文介绍了在OWL中的相同属性中定义多个域/范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在OWL中设置数据/对象属性的域/范围的正确方法是什么?

What's the correct way to set domains/ranges of data/object properties in OWL?

如果我有两个类AB和一个数据属性hasName:

If I have two classes A, B and a data property hasName:

<Declaration><Class IRI="#A"/></Declaration>
<Declaration><Class IRI="#B"/></Declaration>
<Declaration><DataProperty IRI="#hasName"/></Declaration>
<FunctionalDataProperty>
    <DataProperty IRI="#hasName"/>
</FunctionalDataProperty>
<DataPropertyRange>
    <DataProperty IRI="#hasName"/>
    <Datatype abbreviatedIRI="xsd:string"/>
</DataPropertyRange>

我想将类A和类B分别设置为hasName的域.我试图通过三种方式做到这一点,下面哪种方法是正确的?

I want to set class A and class B as solely domains for hasName. I tried to do it in three ways, which approach bellow is correct?

  • 选项1-推断域结果:ABowl:Thing

<DataPropertyDomain>
    <DataProperty IRI="#hasName"/>
    <Class IRI="#A"/>
</DataPropertyDomain>
<DataPropertyDomain>
    <DataProperty IRI="#hasName"/>
    <Class IRI="#B"/>
</DataPropertyDomain>

  • 选项2-推断域结果:owl:Thing

    <DataPropertyDomain>
        <DataProperty IRI="#hasName"/>
        <ObjectUnionOf>
            <Class IRI="#A"/>
            <Class IRI="#B"/>
        </ObjectUnionOf>
    </DataPropertyDomain>
    

  • 选项3-推断域结果:owl:Thing

    <EquivalentClasses>
        <Class IRI="#A"/>
        <DataExactCardinality cardinality="1">
            <DataProperty IRI="#hasName"/>
            <Datatype abbreviatedIRI="xsd:string"/>
        </DataExactCardinality>
    </EquivalentClasses>
    <EquivalentClasses>
        <Class IRI="#B"/>
        <DataExactCardinality cardinality="1">
            <DataProperty IRI="#hasName"/>
            <Datatype abbreviatedIRI="xsd:string"/>
        </DataExactCardinality>
    </EquivalentClasses>
    

  • 从选项1中,我从HermiT推理机中得到3个结果:ABowl:Thing,但是当我阅读

    From option 1, I got 3 results from HermiT reasoner: A, B, and owl:Thing, but when I read this post he said that I wrote wrong semantics and should've use owl:unionOf.

    然后,我试图像选项2中那样表达类,但是当我再次推断时,我只得到类owl:Thing,而不是AB.

    Then I tried to express the classes like in option 2, but when I infered again, I only get the class owl:Thing, not A or B.

    使用选项3,我将这些类设置为等效类公理中的域.它可以工作,但随后我无法使用功能强大的推理器工具进行推断:

    With option 3, I set the classes as domains in the equivalent class axioms. It could work but then I cannot use the powerful reasoner tool to infer:

    Set<OWLClass> classes = reasoner.getDataPropertyDomains(hasNameProperty, false).getFlattened();
    

    推荐答案

    第一个也是最重要的一点:OWL语义中的属性hasName的域和范围对hasName的限制不是不是!取而代之的是,这些公理被用来推断通过属性hasName关联的个体的类型.

    First and most important point: Domain and range for a property hasName in OWL semantics are not restrictions on hasName! Instead, those axioms are used to infer types of individuals that are related via the property hasName.

    对于您的示例,它为属性hasName声明了多个域,这意味着这些类的交集,即A and B.

    Regarding your example, it declares multiple domains for the property hasName, which means the intersection of those classes, i.e. A and B.

    这确实是最常见的方式.

    This is indeed the most common way.

    我不明白你在做什么.但是在OWL中,开放世界假设(OWA)成立,这意味着未知信息不被认为是虚假的.只是未知而已.因此,如果您具有通过属性hasName仅与单个x相关的单个a,则标准的OWL推理程序不能(也不能)得出a属于类A的结论.

    I don't get what you're doing here. But in OWL the Open World Assumption (OWA) holds, which means unknown information is not considered to be false. It's just unknown. Thus, if you have an individual a that is only related to an individual x via property hasName a standard OWL reasoner cannot (and must not) conclude that a belongs to class A.

    请注意,OWL中域公理的语义等效subClassOf公理为(用伪曼彻斯特语法)

    Note, the semantic equivalent subClassOf axiom for a domain axiom in OWL is (in pseudo Manchester Syntax)

    hasName Domain: A

    (hasName some owl:Thing) SubClassOf: A

    这篇关于在OWL中的相同属性中定义多个域/范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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