简体   繁体   English

猫头鹰物化与rdf物化

[英]owl reification vs. rdf reification

When it comes to reification, the most obvious solution is RDF reification, but it seems OWL2 has its own vocabulary for that, I'd like to understand why. 在具体化方面,最明显的解决方案是RDF具体化,但似乎OWL2有自己的词汇,我想了解原因。 Let's take an example: if I have the following dataset (it's a tiny subset of the dataset we're using, which uses OWL): 让我们举一个例子:如果我有以下数据集(它是我们正在使用的数据集的一小部分,它使用OWL):

@prefix :      <http://purl.bdrc.io/ontology/core/> .
@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#> .

bdr:T123  a     :Topic ;
    rdfs:seeAlso    bdr:T1129 .

I can reify and annotate the seeAlso statement with RDF like this: 我可以像这样使用RDF来修改和注释seeAlso语句:

_:b0 a             rdf:Statement ;
     rdf:subject   bdr:T123 ;
     rdf:predicate rdfs:seeAlso ;
     rdf:object    bdr:T1129 ;
     rdfs:label    "reification 1" .

But it's quite easy to find some examples ( here , here , etc.) of things like: 但是很容易找到一些例子( 这里这里等):

_:b1 a             owl:Axiom ;
     owl:subject   bdr:T123 ;
     owl:predicate rdfs:seeAlso ;
     owl:object    bdr:T1129 ;
     rdfs:label    "reification 2" .

First question: my understanding is that the owl:subject,predicate,object are deprecated, is that so? 第一个问题:我的理解是owl:subject,谓词,对象被弃用了,是这样吗?

The other way to reify and annotate a triple with OWL seems to be: 另一种用OWL来修改和注释三元组的方法似乎是:

_:b2 a                     owl:Axiom ;
     owl:annotatedSource   bdr:T123 ;
     owl:annotatedProperty rdfs:seeAlso ;
     owl:annotatedTarget   bdr:T1129 ;
     rdfs:label            "reification 3" .

(it's what is used by Protege for instance) but I cannot understand the difference between the RDF reification+annotation and the OWL reification+annotation... Is the OWL way just a way to tell the reasoner not to take the reification into account? (这是Protege使用的例子)但是我无法理解RDF物化+注释与OWL物化+注释之间的区别...... OWL方式是否只是告诉推理者不考虑具体化的方法? What are the other difference? 还有什么区别?

RDF reification provides a way to talk about a statement in RDF. RDF具体化提供了一种在RDF中讨论语句的方法。 The reification triples say that there is a resource of type statement that expresses what the RDF triple bdr:T123 rdfs:seeAlso bdr:T1129 says. 具体化三元组说有一个类型语句的资源表示RDF三重bdr:T123 rdfs:seeAlso bdr:T1129说。 Then you can add statements about this statement, regardless of whether the reified statement is true. 然后,无论reified语句是否为true,都可以添加有关此语句的语句。 For instance, you could say that the statement represents Akira's opinion, or that the statement is true between 1942 and 2017. 例如,您可以说该陈述代表Akira的意见,或者该陈述在1942年至2017年之间是真实的。

OWL 2 axiom annotations provide a way to add information about an axiom. OWL 2公理注释提供了一种添加公理信息的方法。 The annotation says something about the axiom, not necessarily about what it expresses. 注释说明了关于公理的一些内容,而不一定是它所表达的内容。 For instance, it may say that the axiom was added to the ontology in October 2014, which does not mean that the statement holds in 2014. The OWL 2 annotation mechanism is defined according to the OWL 2 structural specification and functional-style syntax , where an axiom annotation is written like this: 例如,它可能会说公理在2014年10月被添加到本体,这并不意味着该声明在2014年成立.OWL 2注释机制是根据OWL 2结构规范和功能样式语法定义的 ,其中公理注释是这样写的:

AnnotationAssertion(
    Annotation(rdfs:label "reification 1")
    rdfs:seeAlso bdr:T123 bdr:T1129
)

Note that, in OWL 2, rdfs:seeAlso is defined as an annotation property, so the original assertion ( bdr:T123 rdfs:seeAlso bdr:T1129 ) is itself an annotation assertion. 请注意,在OWL 2中, rdfs:seeAlso被定义为注释属性,因此原始断言( bdr:T123 rdfs:seeAlso bdr:T1129 )本身就是一个注释断言。 As you should see, there is no reification here. 正如你应该看到的,这里没有具体的规定。 As Ignazio said , the owl:annotated* terms only exists in the mapping to RDF graphs. 正如Ignazio所说owl:annotated*术语仅存在于RDF图的映射中。

To make an analogy with programming, you can imagine a programme where one wants to manage programming instructions as first class citizens. 为了与编程类比,您可以想象一个程序,其中一个人想要将编程指令作为一等公民来管理。 For instance, if the programming language allows you to write: 例如,如果编程语言允许您编写:

MyClass.myMethod(param1,param2); // Instruction I1

And you want to have an in-memory structure for telling when such an instruction was executed, you could introduce a class that reifies instructions: 并且您希望有一个内存结构来告诉执行此类指令的时间,您可以引入一个可以实现指令的类:

Instruction ins = new Instruction(...); // Construct Instruction I1
ins.setExecutionTime("2017-08-13T10:42:42");

This is analogous to RDF reification. 这类似于RDF具体化。 Now, I could also say that the instruction was added to the code there by Béatrice. 现在,我还可以说Béatrice将指令添加到了代码中。 However, this is not saying something about the instruction per se, but about its occurence in the code. 但是,这并没有说明指令本身,而是说它在代码中的出现。 So it would be better expressed like so: 所以它会更好地表达如下:

MyClass.myMethod(param1,param2); // this was added by Béatrice

This is analogous to an OWL 2 annotation. 这类似于OWL 2注释。

I believe that owl:{subject,predicate,object} reflected an early proposal for the URIs for these RDF properties. 我相信owl:{subject,predicate,object}反映了这些RDF属性的URI的早期提议。 They were never part of any specification so while not officially deprecated, they are not used. 它们从未成为任何规范的一部分,因此虽然没有正式弃用,但它们并未被使用。 The owl:annotated{Source,Property,Target} URIs are the ones in the official spec Ignazio links to. owl:annotated{Source,Property,Target} URI是Ignazio链接到的官方规范中的URI。

The fact that we have two vocabularies (RDF, OWL2) for reification is unfortunate but deemed necessary by the OWL2 spec developers. 我们有两个词汇表(RDF,OWL2)进行具体化的事实是不幸的,但OWL2规范开发人员认为这是必要的。 There are some other differences - eg OWL reified axioms must be blank nodes. 还有一些其他差异 - 例如,OWL具体化的公理必须是空白节点。

The owl annotation you've shown is only for annotations on axioms in RDF, as described here: https://www.w3.org/TR/owl2-mapping-to-rdf/ 您显示的owl注释仅适用于RDF中公理的注释,如下所述: https//www.w3.org/TR/owl2-mapping-to-rdf/

Reasoners are unaware of reified statements, as this reification is a syntactic workaround for RDF only - other syntaxes do not reify axioms in order to annotate them, or to nest annotations. Reasoners不知道具体化的语句,因为这种具体化只是RDF的语法解决方法 - 其他语法不会为了对它们进行注释或嵌套注释而重新定义公理。 (Having spent some time debugging the OWLAPI code that deals with nested annotations, I would like to express my gratitude to the authors of those syntaxes where nesting annotations is straightforward). (花了一些时间调试处理嵌套注释的OWLAPI代码,我想对嵌套注释很简单的那些语法的作者表示感谢)。

I am not aware of owl:annotated* properties being deprecated. 我不知道owl:annotated*属性已被弃用。 They're part of the current OWL2 to RDF mapping. 它们是当前OWL2到RDF映射的一部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM