Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
331 views
in Technique[技术] by (71.8m points)

semantic web - Representing complicated sentences using RDF syntax

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

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

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 :(

Plz Help, thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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

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

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" .

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...