【问题标题】:Define mutiple domains/ranges in a same propery in OWL在 OWL 中的同一属性中定义多个域/范围
【发布时间】:2017-07-24 13:33:17
【问题描述】:

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

如果我有两个类AB 和一个数据属性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 的唯一域。我尝试了三种方法,下面哪种方法是正确的?

  • 选项 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,但是当我阅读 this post 时,他说我写错了语义,应该使用 owl:unionOf .

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

使用选项 3,我将类设置为等效类公理中的域。它可以工作,但我无法使用强大的推理工具进行推断:

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

【问题讨论】:

    标签: rdf semantic-web owl owl-api rdfs


    【解决方案1】:

    第一点也是最重要的一点:OWL 语义中属性hasName 的域和范围不是hasName 的限制!相反,这些公理用于推断通过属性hasName 相关的个人类型。

    选项 1

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

    选项 2

    这确实是最常见的方式。

    选项 3

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

    注意,OWL 中域公理的语义等价 subClassOf 公理是(在伪曼彻斯特语法中)

    hasName Domain: A

    (hasName some owl:Thing) SubClassOf: A

    【讨论】:

    • 有没有办法让推理者推断第二个选项中的域?
    猜你喜欢
    • 2023-03-15
    • 2016-09-02
    • 2014-03-17
    • 1970-01-01
    • 1970-01-01
    • 2014-04-19
    • 1970-01-01
    • 2013-09-20
    • 1970-01-01
    相关资源
    最近更新 更多