如何构造一个“Nobody”的 OWL 属性?

问题描述 投票:0回答:1

我正在尝试创建一个 OWL 本体,其中包括

claimedBy
属性,该属性可以是个人、组织或类似的“代理”(本质上是
foaf:Agent
),也可以是无主的(
owl:Thing claimedBy A
)。

我需要能够区分“不知道(不在这个数据集中)是否有人声称

owl:Thing
”和“已知目前没有任何人声称特定的
owl:Thing
”。

目标是能够拥有以下数据集:

<#Alice> a <https://schema.org/Person> .
<#RedBall> a owl:Thing .
<#GreenBall> a owl:Thing .
<#BlueBall> a owl:Thing .

<#RedBall> claimedBy <#Alice> .
<#GreenBall> claimedBy owl:Nothing .

其中记录了Alice当前认领红球、绿球可供认领、蓝球处于未知认领状态的信息(该机构不知道蓝球是否被认领)或不)。

我的想法是将属性定义为:

<#claimedBy> a owl:ObjectProperty ;
  rdfs:domain owl:Thing ;
  rdfs:range [
    owl:unionOf (
      <http://xmlns.com/foaf/0.1/Agent>
      <https://schema.org/Person>
      <https://schema.org/Organization>
      owl:Nothing
    )
  ] .

但这会阻止尝试将其可视化的 WebVOWL 工具。这是 WebVOWL 中的错误,还是

owl:Nothing
的误用?我是否需要创建一个特定的
<Nobody>
实例才能使此设置在语义上起作用?

rdf owl rdfs turtle-rdf
1个回答
0
投票

Nothing
的含义是代表空集。您如何使用
Nothing
(在 <#GreenBall>claimBy owl:Nothing 中)意味着
Nothing
是一个个体。
claimedBy
等对象属性定义了个体之间的关系。

您可以按照以下方式进行设计。您的主要目标是区分特工已认领和未认领的物品。因此,将

Agent
Item
定义为不相交的类。
Agent
可以有更多的子类,如
Person
Orgranization
Item
具有不相交的子类
KnownToBeClaimed
KnownToBeUnclaimed
KnownToBeClaimed
定义为至少 1 个
Agent
所要求的等效项。
KnownToBeClaimed
定义为已知物品最多具有零个索赔。

如果你现在有一个个体

knownToBeClaimed
是一个
Item
并且它被
person1
(一个
Person
)声明,推理者(Hermit 或任何 OWL DL 推理者)将推断出该
knownToBeClaimed
个体属于班级
KnownToBeClaimed

如果您有一个个体

knownToBeUnclaimed
,类型设置为
Item
claimedBy max 0  owl:Thing
,则
knownToBeUnclaimed
个体将被推断属于
KnownToBeUnclaimed
类。

如果您有一件物品没有更多信息,则该物品将只是一件无法推断是否已被认领的物品。如果您愿意,您可以向 Item 添加一个名为

UnknownWhetherClaimed
的第三个子类,它与
KnownToBeClaimed
KnownToBeUnclaimed
不相交。如果您现在定义一个类型为
Item
的个体,并且声明它是
not KnownToBeClaimed and not KnownToBeUnclaimed
,它将推断该项目是
UnknownWhetherClaimed

以下是曼彻斯特语法的本体。

    Prefix: : <http://www.semanticweb.org/henriette007/stackoverflow-77848886/how-to-structure-an-owl-property-that-be-nobody.owl/>
    Prefix: so: <http://www.semanticweb.org/henriette007/stackoverflow-77848886/how-to-structure-an-owl-property-that-be-nobody.owl#>
    Prefix: owl: <http://www.w3.org/2002/07/owl#>
    Prefix: rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    Prefix: rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    Prefix: xml: <http://www.w3.org/XML/1998/namespace>
    Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>



    Ontology: <http://www.semanticweb.org/henriette007/stackoverflow-77848886/how-to-structure-an-owl-property-that-be-nobody.owl>
    <http://www.semanticweb.org/henriette007/stackoverflow-77848886/v0.1/how-to-structure-an-owl-property-that-be-nobody.owl>

    ObjectProperty: so:claimedBy

        
    Class: so:Agent

        DisjointWith: 
            so:Item
        
        
    Class: so:Item

        DisjointUnionOf: 
            so:KnownToBeClaimed, so:KnownToBeUnclaimed, so:UnknownWhetherClaimed
        
        DisjointWith: 
            so:Agent
        
        
    Class: so:KnownToBeClaimed

        EquivalentTo: 
            so:claimedBy some so:Agent
        
        SubClassOf: 
            so:Item
        
        
    Class: so:KnownToBeUnclaimed

        EquivalentTo: 
            so:claimedBy max 0 owl:Thing
        
        SubClassOf: 
            so:Item
        
        
    Class: so:Organization

        SubClassOf: 
            so:Agent
        
        
    Class: so:Person

        SubClassOf: 
            so:Agent
        
        
    Class: so:UnknownWhetherClaimed

        SubClassOf: 
            so:Item
        
        
    Class: owl:Thing

        
    Individual: so:knownToBeClaimedItem

        Types: 
            so:Item
        
        Facts:  
        so:claimedBy  so:person1
        
        
    Individual: so:knownToBeUnclaimedItem

        Types: 
            so:Item,
            so:claimedBy exactly 0 owl:Thing
        
        
    Individual: so:person1

        Types: 
            so:Person
        
        
    Individual: so:unknownWhetherClaimedItem

        Types: 
            so:Item,
            (not (so:KnownToBeClaimed))
            and (not (so:KnownToBeUnclaimed))
        
        
    DisjointClasses: 
        so:KnownToBeClaimed,so:KnownToBeUnclaimed,so:UnknownWhetherClaimed

© www.soinside.com 2019 - 2024. All rights reserved.