简体   繁体   中英

Simple Format for Implicit Reification

Is there any RDF serialization format (like Notation 3 ) that supports implicit reification for easily representing statements about statements?

For example, say I have the statement "Mary bought a house", which I would represent in N3 like:

:Mary :bought-a :house .

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

Intuitively, I'd like to be able to represent this by writing something like:

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

However, I think the way this would "officially" be represented in N3 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 bit more complicated and harder to read. It gets even more complicated if I need to make statements about statements about statements. eg "I heard this from Rob, while Rob was walking down the street".

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

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

  • accessing the data is harder,
  • the size of the dataset increases drastically as every triple becomes 4 triples,
  • SPARQL queries that work on a non-reified dataset will not work on a reified one,
  • reasoners will mess up things or will not work.

After having coded myself a number of Semantic Web applications, the very few times that I have used implicit reification I have regretted.

In your case I would try to model it with explicit reification by using a Blank Node as intermediate joint point for 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 plain RDF/ntriples this is is the same as (transformed with 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 of rdf:type House , and you heard it from Rob and Yourself .

I find this solution cleaner and less costly than implicit reification. I hope this helps.

I would use named graphs and wouldn't be scared to put a single statement in a graph. You could put the original statement in a graph and then the meta-statements would be about that graph rather than the statement within. Those can be put into one or more other graphs and then if you need some crazy meta-meta-statements then you can deal with it in the same way as the original meta-statement by referencing the graphs that contain the meta-statements.

When reasoning or using the graphs later, you may need to "collapse" all of your leaf/non-meta graphs into a single graph. This is also a good way to reason about meta-data in order to discover which graphs to "collapse" into your trusted statements to do actual reasoning over.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM