How can I express additional information (time, probability) regarding the relationship in RDF?

I know that I can represent any relation as an RDF triplet, as in:

Barack Obama -> president of -> USA

(I know this is not RDF, I just illustrate)

But how can I add additional information about this relationship, for example, the time dimension? I mean, he is in his second presidential period, and any period lasts only after the passage of time. And what about after and before his presidential term?

+4
source share
1 answer

There are several options for this. I will illustrate some of the most popular.

Named Graphics / Squares

RDF RDF, ( " " ). RDF RDF, "" ( "" ).

. ( - RDF):

:i1 a :TimePeriod .
:i1 :begin "2009-01-20T00:00:00Z"^^xsd:dateTime .
:i1 :end "2017-01-20T00:00:00Z"^^xsd:dateTime .

:barackObama :presidentOf :USA :i1 .

: " - " , :i.

, , . , ( ), , ( ).

. " " "" , , , . RDF ( ):

:barackObama :hasRole :president_44 .
:president_44 a :Presidency ;
         :of :USA ;
         :begin "2009-01-20T00:00:00Z"^^xsd:dateTime ;
         :end "2017-01-20T00:00:00Z"^^xsd:dateTime .

( "" :president_44).

. , SPARQL.

RDF

, "", RDF - W3C " ". :

 :obamaPresidency a rdf:Statement ;
         rdf:subject :barackObama ;
         rdf:predicate :presidentOf ;
         rdf:object :USA ;
         :trueBetween [
                :begin "2009-01-20T00:00:00Z"^^xsd:dateTime ;
                :end "2017-01-20T00:00:00Z"^^xsd:dateTime .
         ] .

RDF:

  • . , , , RDF-reification - .
  • , , : " , , ... ...". , , ! , , ( , ), /.
  • SPARQL.

, W3C N- RDF , ( .).

+8

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


All Articles