Presenting complex sentences using RDF syntax

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

With a simple sentence, such as: "Ann study Math", there is no problem representing it using RDF.

But with more complex sentences, such as: " Mr Parker teaches Machine Learning and uses a book called" ML-for-newbie ", I mean that Mr. Parker uses this book to prepare his lectures. There are 3 objects: Mr Parker , Machine Learning, ML-for-newbie ; 2 predicates: teach, use . So, how to present this sentence in RDF? As I know, one RDF statement is similar to Subject --predicate β†’ Object, and 3 objects and 2 predicates confuse me : (

Plz help, thanks!

+6
source share
2 answers

In your case, you can decompose these sentences into 3 RDF statements or use a blank node .

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

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

With anonymous nodes (empty node _:b1 ), this is the same principle, but the course is clearly not fixed:

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

Now, as mentioned in the comments, the line "ML-for-newbies" is not really a book, it just represents the name of the book. Thus, you can add more triples to get additional information about this element (for example, the author of this book). You might consider reusing an already developed dictionary for this task (for example, 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 line represents the name of the author, but not the author (for the book, for example), so you can expand your triples even more by presenting this type of object, if necessary.

+6
source

The accepted answer is good and has examples, but it is worth taking a look at the W3C Working Group note Defining N-ary Relations in the Semantic Network , which discusses these problems with presentation. Approach in the accepted answer Sample 1: introducing a new class for the relationship in this note. There's also Sample 2: Using lists for arguments in a relation , but it feels awkward, and I don't think so many people use this approach.

+4
source

Source: https://habr.com/ru/post/944686/


All Articles