如何区分RDF中的两个空白节点? [英] How to distinguish between two Blank Nodes in RDF?

查看:289
本文介绍了如何区分RDF中的两个空白节点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难理解w3.org的一段内容.令人困惑的段落可能是一个错误,或者我可能只是感到困惑.

以下是第6.6节RDF概念规范

6.6空白节点

RDF图中的空白节点是从无限集中得出的.这组空白节点,所有RDF URI引用的集合和所有文字的集合是成对不相交的.

否则,这组空白节点是任意的.

RDF没有引用空白节点的任何内部结构.给定两个空白节点,可以确定它们是否相同.

所以,我感到困惑的是:如果没有办法知道空白便笺的内部结构",那么如何区分它们呢?这是错字吗?

解决方案

这不是拼写错误,我同意,理解起来也不是直截了当.这也是一个经常出现的问题.存在空白节点是因为有时无法创建表示节点的URI.例如,在构造约束时,这种情况一直在OWL中发生.

通常,在解析RDF文件时,将创建一个空白节点ID,并且该ID必须是唯一的.因此,根据定义,您不应找到两个具有相同标识符的空白节点.区分两个空白节点的一种方法是查看所有传入/传出的谓词及其对象/主题,以查看所连接的子图是否相同.这很难实现,而且对于大型图形而言,计算起来可能会非常昂贵.

已经在发现RDF图之间的差异方面广泛讨论了这个问题.一篇非常有趣的文章是TimBL的设计问题之一 Delta:RDF图之间差异分布的本体论.还可以查看如何从w3c区分RDF图wiki .

如果您是数据发布者,则请尽量避免使用空白节点.如果您需要空白节点,则尝试提供一个哈希函数,该函数为不同的空白节点构造提供唯一的ID,这样,具有相同图形结构的两个不同的空白节点将具有相同的ID,因此您可以将它们放入Appart.

I am having difficulty understanding a passage from w3.org. The confusing passage may be an error, or I may just be confused.

The following is Section 6.6 of the RDF Concepts Specification,

6.6 Blank Nodes

The blank nodes in an RDF graph are drawn from an infinite set. This set of blank nodes, the set of all RDF URI references and the set of all literals are pairwise disjoint.

Otherwise, this set of blank nodes is arbitrary.

RDF makes no reference to any internal structure of blank nodes. Given two blank nodes, it is possible to determine whether or not they are the same.

So, the thing I'm confused about is: If there is no way to know the "internal structure of blank notes", how can one tell them apart? Is this a typo?

解决方案

It is not a typo and I agree, it is not straight forward to understand. This is a also recurrent issue. Blank nodes exist because sometimes there aren't ways to create an URI to represent a node. This case happens all the time in OWL when constructing constrains, for example.

A blank node ID is created, normally, when the RDF file is parsed and it must be unique. So by definition you shouldn't find two blank node with same identifiers. One way of distinguish between two blank nodes is to look at all the incoming/out-coming predicates plus their objects/subjects in order to see if the connected sub-graphs are identical. This is hard to implement and it could be very expensive to compute for large graphs.

This problem has been widely discussed in connection with finding differences between RDF graphs. One very interesting article is one of the TimBL's design issues Delta: an ontology for the distribution of differences between RDF graphs. Also have a look at How to diff RDF graphs wiki from the w3c.

If you are the data publisher then try to avoid blank nodes if posible. If you need blank nodes then try to come up with a hash function that gives you a unique ID for different blank node constructions in such a way that two different blank nodes with the same graph structure will have the same ID and therefore you can put them appart.

这篇关于如何区分RDF中的两个空白节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆