Simple format for implicit reunion

Is there any RDF serialization format (like Notation 3 ) that supports implicit validation to easily provide statement instructions?

For example, let's say I have a statement “Mary bought a house” that I would present in N3, for example:

:Mary :bought-a :house . 

Now say that I wanted to add meta-statements about this statement, such as "I heard it from Rob."

Intuitively, I would like to introduce this by writing something like:

 :Mary :bought-a :house . :heard-by :me . :heard-from :Rob . 

However, I think that so “officially” would be introduced in N3, it would be something like:

 [ a rei:Statement; rei:subject [rei:uri :Mary]; rei:predicate [rei:uri :bought-a]; rei:object [rei:value :house] ] [ :heard-by :me; :heard-from :Rob; ] . 

which is obviously a little harder and harder to read. This becomes even more complicated if I need to make statements about statements about statements. for example, "I heard it from Rob, and Rob was walking down the street."

What would be the correct and easy way to represent this in RDF serialization format?

+4
source share
2 answers

I would use the named graphs and would not be afraid to put one operator in the graph. You can put the original operator in the graph, and then the meta-operators will be about that graph, and not in the statement inside. They can be placed in one or several other graphs, and then, if you need some crazy meta-meta-operators, you can deal with it the same way as the original meta-operator, referring to graphs containing meta-operators .

When analyzing or using graphs later, you may need to “collapse” all your sheets / non-graphical graphs into one graph. This is also a good way to reason about metadata, to discover which graphs are “collapsed” into your trusted statements to make the actual reasoning.

+2
source

I would try to avoid implicit overlapping, if possible, for a number of reasons, but more specifically, because:

  • access to data is more difficult
  • the size of the data set increases dramatically, as each triple becomes 4 triples,
  • SPARQL queries that work with an uninitialized dataset will not work on reified,
  • judges will ruin things or not work.

After I coded several semantic web applications, very few of those cases when I used implicit confirmation I regretted.

In your case, I would try to model it with explicit confirmation, using Blank Node as an intermediate join point for the heard-by and heard-from predicates. Something like (in RDF / Turtle):

 @prefix : <http://somedata.org/id/> . :Mary :bought-a [ a :House; :heard-by :me; :heard-from :Rob ] . 

In simple RDF / ntriples, this is the same (converted using rapper ):

 <http://somedata.org/id/Mary> <http://somedata.org/id/bought-a> _:genid1 . _:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://somedata.org/id/House> . _:genid1 <http://somedata.org/id/heard-by> <http://somedata.org/id/me> . _:genid1 <http://somedata.org/id/heard-from> <http://somedata.org/id/Rob> . 

As you can see, Mary bought something rdf:type House , and you heard it from Rob and Yourself .

I find this solution cleaner and less expensive than implicit reification. Hope this helps.

+3
source

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


All Articles