使用 RDF 语法表示复杂的句子 [英] Representing complicated sentences using RDF syntax

查看:48
本文介绍了使用 RDF 语法表示复杂的句子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 RDF 的新手,我有一个关于 RDF 的问题.

I am new to RDF and I have one question about RDF.

对于一些简单的句子,例如:Ann learning Math",使用 RDF 表示它没有问题.

With some simple sentence like : "Ann studies Math", there's no problem to represent it using RDF.

但是对于更复杂的句子,例如:Mr Parker 教授机器学习并使用名为 ML-for-newbie 的书",我的意思是 Parker 先生使用这本书来准备他的讲座.有 3 个对象:Parker 先生,机器学习,机器学习新手;2 个谓词:教导、使用.那么如何在RDF中表示这句话呢?据我所知,一个 RDF 语句就像 Subject --predicate--> Object,而 3 个对象和 2 个谓词让我感到困惑:(

But with more complicated sentences such as: "Mr Parker teaches Machine Learning and uses the book named ML-for-newbie", I mean Mr Parker uses that book to prepare his lectures. There're 3 objects : Mr Parker, Machine Learning, ML-for-newbie; 2 predicates: teach, use. So how to represent this sentence in RDF? As I know, one RDF statement is like Subject --predicate--> Object, and the 3 objects and 2 predicates make me confused :(

请帮忙,谢谢!

推荐答案

在您的情况下,您可以将这些句子分解为 3 个 RDF 语句或使用 空白节点.

In your case, you could either decompose these sentences in 3 RDF statements or use a blank node.

分解的例子,课程有自己的URI(:Course999):

Examples of decomposition, the course has its own URI (:Course999):

:Mr_Parker    :teaches    :Course999 .
:Course999    :courseName    "Machine Learning" .
:Course999    :hasSupportBook    "ML-for-newbies" .

对于匿名节点(空白节点_:b1),原理相同,但没有明确捕获过程:

With anonymous nodes (blank node _:b1), it's the same principle but the course is not explicitly captured:

:Mr_Parker    :teaches    _:b1 .
_:b1    :courseName    "Machine Learning" .
_:b1    :hasSupportBook    "ML-for-newbies" .

现在正如评论中提到的,字符串ML-for-newbies"实际上不是一本书,它只是代表书名.所以你可以添加更多的三元组来捕获关于这个项目的额外信息(例如这本书的作者).你可以考虑为这个任务重新使用已经开发的词汇(比如都柏林核心):

Now as mentioned in the comments, the string "ML-for-newbies" is actually not a book, it just represent the title of the book. So you could add more triples to capture extra information about this item (like the author of this book for instance). You can think of re-using already developed vocabulary for this task (like the Dublin Core):

:Mr_Parker    :teaches    _:b1 .
_:b1    :hasSupportBook    :book2 .
:book2    dcterms:title    "ML-for-newbies" .
:book2    dcterms:creator    "John Smith" .

... 然后这里的字符串只代表作者的名字,而不是作者本身(就像这本书一样),所以如果需要,你可以通过表示这个实体类型来进一步扩展你的三元组.

... and then here the string represent just the name of the author but not the author itself (like for the book), so you could expand your triples even more by representing this entity type too if needed.

这篇关于使用 RDF 语法表示复杂的句子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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