gpt4 book ai didi

sparql - 为什么使用猫头鹰:Restriction as own:EquivalenceClass's property?

转载 作者:行者123 更新时间:2023-12-02 09:23:36 25 4
gpt4 key购买 nike

我刚刚开始学习语义网,有一个关于限制类的问题。我挖了一段时间但还没有找到任何答案..任何帮助将不胜感激!从课本上,我看到定义限制类的示例,它们都是要定义一个匿名 owl:Restrictionbnode 并链接这个 bnode具有属性 owl:equivalentClass

示例:

example:restrictionClass owl:equivalentClass [
rdf:type owl:Restriction;
owl:onProperty example:resProp;
owl:someValuesFrom example:resValue.
]

我的问题是我们可以直接定义一个限制类吗?喜欢:

 example:restrictionClass rdf:type owl:Restriction;
owl:onProperty example:resProp;
owl:someValuesFrom example:resValue.

定义匿名owl:Restriction有什么好处?

最佳答案

不,你不能。您看到的 RDF 是 OWL 公理的编码,例如:EquivalentClasses(C ObjectSomeValuesFrom(p D))。它被编码为:

:C owl:equivalentClass [
rdf:type owl:Restriction;
owl:onProperty :p;
owl:someValuesFrom :D .
]

现在,假设您还有公理EquivalentClasses(C ObjectSomeValuesFrom(r E))。编码为:

:C owl:equivalentClass [
rdf:type owl:Restriction;
owl:onProperty :r;
owl:someValuesFrom :E .
]

现在,如果您可以应用所需的缩写,您将得到:

:C rdf:type owl:Restriction ;
owl:onProperty :p ;
owl:onProperty :r ;
owl:someValuesFrom :D ;
owl:someValuesFrom :E .

现在有歧义。 C 等于以下哪一个?

  • ObjectSomeValuesFrom(p D)
  • ObjectSomeValuesFrom(p E)
  • ObjectSomeValuesFrom(r D)
  • ObjectSomeValuesFrom(r E)

仅从 RDF 来看,您无法判断。您实际上需要对EquivalentClasses公理进行编码。

附录

为了解决评论中的问题:我使用了 C、p 和 D 来缩短文本。您的原始 RDF 片段是公理的 RDF 编码

EquivalentClasses(
    example:restrictionClass
    ObjectSomeValuesFrom(example:resProp example:resValue)
)

就是这样

example:restrictionClass owl:equivalentClass [
rdf:type owl:Restriction;
owl:onProperty example:resProp;
owl:someValuesFrom example:resValue.
]

编码。 example:restrictionClass 在两个地方都是相同的 IRI。整个空白节点是类表达式ObjectSomeValuesFrom(example:resProp example:resValue)。然后 owl:equivalentClass 只是将两者联系起来。请注意,表达式并不相同;它们表示的类是相同的。从 OWL 本体到 RDF 的映射在 OWL 2 Web Ontology Language: Mapping to RDF Graphs (Second Edition) 中给出。 。具体来说,请查看2.1 Translation of Axioms without Annotations中的表1。您可以在其中找到规则:

EquivalentClasses( CE1 ... CEn )
------------------------------------
T(CE1) owl:equivalentClass T(CE2) .
...
T(CEn-1) owl:equivalentClass T(CEn) .

ObjectSomeValuesFrom( OPE CE )
------------------------------
_:x rdf:type owl:Restriction .
_:x owl:onProperty T(OPE) .
_:x owl:someValuesFrom T(CE) .

当您朝相反方向前进时,您可以读取 RDF 并重建您的公理。但是支持映射允许您执行您正在讨论的缩写,并且您有两个等效的类公理。您最终会得到不明确的 RDF,因为您有两个 owl:onProperty 三元组和两个 owl:someValuesFrom 三元组。

也许算术示例会有所帮助。我们知道42+21+3都是表示相同数字的表达式。所以我们可以得到公理:

  • 4 = 2 + 2
  • 4 = 1 + 3

现在假设我们用 RDF 对其进行编码,如下所示:

:four :equals [ rdf:type :sum ; :left :two ; :right :two ] .
:four :equals [ rdf:type :sum ; :left :one ; :right :three ] .

这很好,我们可以从中重构 4 = 2+24 = 1+3。现在假设我们尝试将这些属性移动到 :four,而不是与 :equals 相关的空白节点。我们最终会得到:

:four rdf:type :sum .
:four :left :two .
:four :right :two .
:four :left :one .
:four :right :three .

但是这应该代表什么公理呢?您有四种方式从 :four 中选择左侧和右侧。它应该编码以下哪项?

  • 4 = 2 + 2
  • 4 = 2 + 3
  • 4 = 1 + 2
  • 4 = 1 + 3

关于sparql - 为什么使用猫头鹰:Restriction as own:EquivalenceClass's property?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33995497/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com