为什么使用 owl:Restriction 作为 own:EquivalenceClass 的 属性?

Why use owl:Restriction as own:EquivalenceClass's property?

我刚开始学习语义网,有一个关于限制的问题class。我挖了一段时间但还没有找到任何答案..任何帮助将不胜感激! 从课本上看到define restriction class的例子,都是要定义一个匿名的owl:Restriction class bnode 和link this bnode 与 属性 owl:equivalentClass.

示例:

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

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

 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。整个空白节点是 class 表达式 ObjectSomeValuesFrom(example:resProp example:resValue)。那么 owl:equivalentClass 就把两者联系起来了。请注意 表达式 是不一样的;他们 表示 的 class 是相同的。 OWL 本体到 RDF 的映射在 OWL 2 Web Ontology Language: Mapping to RDF Graphs (Second Edition). Specifically, have a look at Table 1 in 2.1 Translation of Axioms without Annotations 中给出,您可以在其中找到规则:

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 并重构你的公理。但是支持映射让你做你正在谈论的缩写,并且你有 两个 等效的 class 公理。你最终会得到模棱两可的 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