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

Cha*_*how 4 semantic-web ontology sparql linked-data

我刚开始学习语义Web,并对限制类有疑问.我挖了一段时间,但还没有找到任何答案..任何帮助将不胜感激!从教科书中,我看到了限定类的例子,它们都是要定义一个匿名owl:Restrictionbnode并将其bnode与属性相关联owl:equivalentClass.

例:

example:restrictionClass owl:equivalentClass [
    rdf:type owl:Restriction;
    owl:onProperty example:resProp;
    owl:someValuesFrom example:resValue.
]
Run Code Online (Sandbox Code Playgroud)

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

 example:restrictionClass rdf:type owl:Restriction;
                         owl:onProperty example:resProp;
                         owl:someValuesFrom example:resValue.
Run Code Online (Sandbox Code Playgroud)

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

Jos*_*lor 7

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

:C owl:equivalentClass [
   rdf:type owl:Restriction;
   owl:onProperty :p;
   owl:someValuesFrom :D .
]
Run Code Online (Sandbox Code Playgroud)

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

:C owl:equivalentClass [
   rdf:type owl:Restriction;
   owl:onProperty :r;
   owl:someValuesFrom :E .
]
Run Code Online (Sandbox Code Playgroud)

现在,如果你可以应用你想要的缩写,你会得到:

:C rdf:type owl:Restriction ;
   owl:onProperty :p ;
   owl:onProperty :r ;
   owl:someValuesFrom :D ;
   owl:someValuesFrom :E .
Run Code Online (Sandbox Code Playgroud)

现在有歧义.C等于以下哪一项?

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

仅从RDF,你没有办法告诉.您实际上需要编码EquivalentClasses公理.

附录

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

EquivalentClasses(
    示例:restrictionClass
    ObjectSomeValuesFrom(示例:resProp示例:resValue)
)

那是什么

example:restrictionClass owl:equivalentClass [
    rdf:type owl:Restriction;
    owl:onProperty example:resProp;
    owl:someValuesFrom example:resValue.
]
Run Code Online (Sandbox Code Playgroud)

编码. 示例:restrictionClass在两个地方都是相同的IRI.整个空白节点是类表达式ObjectSomeValuesFrom(例如:resProp示例:resValue).然后owl:equivalentClass只关联两者.注意表达式不一样; 他们表示的类是相同的.从OWL本体到RDF的映射在OWL 2 Web Ontology Language:Mapping to RDF Graphs(Second Edition)中给出.具体来说,请看2.1没有注释的Axioms翻译中的表1 ,您将找到规则:

EquivalentClasses( CE1 ... CEn )
------------------------------------
T(CE1) owl:equivalentClass T(CE2) .
...
T(CEn-1) owl:equivalentClass T(CEn) . 
Run Code Online (Sandbox Code Playgroud)

ObjectSomeValuesFrom( OPE CE )
------------------------------
_:x rdf:type owl:Restriction .
_:x owl:onProperty T(OPE) .
_:x owl:someValuesFrom T(CE) . 
Run Code Online (Sandbox Code Playgroud)

当你向相反方向前进时,你可以阅读RDF并重建你的公理.但支持映射让你做你正在谈论的缩写,并且你有两个等价的类公理.你最终会得到模棱两可的RDF,因为你有两个猫头鹰:onProperty三元组和两个猫头鹰:someValuesFrom三元组.

也许算术的一个例子会有所帮助.我们知道,4,2 + 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 ] .
Run Code Online (Sandbox Code Playgroud)

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

:four rdf:type :sum .
:four :left  :two .
:four :right :two .
:four :left  :one .
:four :right :three .
Run Code Online (Sandbox Code Playgroud)

但这应该代表什么公理呢?你有四种方法可以选择左右两种:四种.它应该编码以下哪一项?

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