RDF 中具体化的简单示例 [英] Simple example of reification in RDF

查看:46
本文介绍了RDF 中具体化的简单示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能给我一个 RDF 中具体化的简单例子?我想看看我是否理解正确.

Could anybody be so kind to give me a simple example of reification in RDF? I want to see if I understood it correctly.

比如我提出以下案例

Tolkien -> wrote -> Lord of the rings
           /|\
            |
        Wikipedia said that

你会如何写没有具体化(即作为一个不需要具体化的简单 RDF 语句)?

How would you write it with and without reification (i.e. as a simple RDF statement with no need for reification)?

推荐答案

托尔金写的指环王"可以表达为这样一个简单的陈述(主语、谓语、宾语):

"Tolkien wrote Lord of the Rings" can be expressed as a simple statement (subject, predicate, object) like this:

:Tolkien :wrote :LordOfTheRings .

顺便说一下,这是对 RDF 使用 Turtle 表示法.在线有工具可将其转换为 RDF/XML.

By the way, this is using the Turtle notation for RDF. There are tools online for converting it to RDF/XML.

使用reification,您可以拥有一个单独的资源来表示一个语句所以你可以陈述关于声明本身的其他内容,比如维基百科说的":

Using reification, you can have a separate resource representing a statement so you can state additional things about the statement itself, like "Wikipedia said that":

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
_:x rdf:type rdf:Statement .
_:x rdf:subject :Tolkien .
_:x rdf:predicate :wrote .
_:x rdf:object :LordOfTheRings .
_:x :said :Wikipedia .

<小时>

在现实生活中,您可能希望使用共享词汇表,以便使用 RDF 的任何人或任何事物都知道您在谈论 那个 Tolkien 和 那个 LOTR:


In real life, you would want to use shared vocabularies, so that whoever or whatever is consuming the RDF will know that you are talking about that Tolkien and that LOTR:

http://dbpedia.org/resource/The_Lord_of_the_Rings
http://dbpedia.org/property/author
http://dbpedia.org/resource/dbppedia/J._R._R._托尔金

这篇关于RDF 中具体化的简单示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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