Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RDF Graph Entailment

Tags:

rdf

rdfs

I just read about the concept of entailment for RDF (Resource Description Framework).Can anyone tell me an example of entailment for two RDF graphs and explain them a bit.

Thanks

like image 626
Anum Lodhi Avatar asked May 15 '13 09:05

Anum Lodhi


People also ask

What are RDF graphs?

RDF is a directed graph composed of triple statements. An RDF graph statement is represented by: 1) a node for the subject, 2) an arc that goes from a subject to an object for the predicate and 3) a node for the object. Each of the three parts of the statement can be identified by a URI.

What are the possible syntaxes to represent an RDF graph?

An RDF graph can be visualized as a node and directed-arc diagram, in which each triple is represented as a node-arc-node link. There can be three kinds of nodes in an RDF graph: IRIs, literals, and blank nodes.

What is RDF nil?

The resource rdf:nil is an instance of rdf:List that can be used to represent an empty list or other list-like structure. A triple of the form: L rdf:rest rdf:nil.

What is RDF data set?

An RDF dataset is defined as a collection of RDF graphs where all but one are named graphs associated with an IRI or blank node (the graph name), and the unnamed default graph [ RDF11-CONCEPTS ].


2 Answers

There's another answer about RDFS entailment, which is important, and a valuable part of day-to-day work with RDF, but RDFS entailment is not the same as RDF entailment. RDF entailment is a relationship between entire RDF graphs, and gives a way of saying "If RDF graph x holds, then so does RDF graph y." The simple entailment section of the RDF Semantics documents describes basic entailment:

Following conventional terminology, I satisfies E if I(E)=true, and a set S of RDF graphs (simply) entails a graph E if every interpretation which satisfies every member of S also satisfies E. In later sections these notions will be adapted to other classes of interpretations, but throughout this section 'entailment' should be interpreted as meaning simple entailment.

This presumes an understanding of the interpretation of graph E, denoted I(E). An interpretation maps each property to a set of pairs. E.g., an interpretation should map the property rdfs:subClassOf to the set of pairs {[x, y] : x is a subclass of y}. For an interpretation to satisfy a graph, then the set of pairs that an interpretation maps a property to must contain at least those pairs that are actually observed in the graph. For instance, if the graph contains

a likes b.
b likes c.

then an interpretation satisfies the graph if and only if I(likes) contains the pairs [a,b] and [b,c]. A graph G1 entails graph G2 if and only if every interpretation that satisfies G1 also satisfies G2. If there are no blank nodes in the graph, this is pretty simple.

The linked section from the RDF Semantics document lists some simple results of this:

  • Every graph entails the empty graph.
  • Every graph entails each of its subgraphs.

Things get more complicated when there are blank nodes in an RDF graph, because blank nodes are interpreted as existential variables. For instance, consider the graph with just one triple (where _:z is a blank node):

a likes _:z

Since _:z is an existential variable, this means that an interpretation satisfies the graph if and only if there exists an individual x such that the interpretation of likes contains a pair [a,x]. If a graph has blank nodes, then replacing those blank nodes with actual terms produces an instance of that graph. For instance,

a likes b

is an instance of the graph

a likes _:z

The linked document also mentions the entailment relation that

  • Every instance of a graph entails the graph

This is easy to see: if an interpretation satisfies a likes b, then its interpretation of likes must contain [a,b], so there certainly is an x (namely b) such that it contains [a,x], so it also satisfies a likes _:z.

These are just a few simple examples of RDF graph entailment. I don't know that this type of entailment actually gets used much in day-to-day work with RDF. Much more common is RDFS-entailment (described in another answer), OWL entailment, and rule-based reasoning.

like image 108
Joshua Taylor Avatar answered Oct 21 '22 23:10

Joshua Taylor


Suppose you have the following :

ex:book1 rdf:type ex:Publication . 
ex:book2 rdf:type ex:Article .

So a Sparql query like SELECT ?s { ?s rdf:type ex:Publication } will return only ex:book1

If you add the fact (or a graph in your data set with the fact) that states :

ex:Article rdfs:subClassOf ex:Publication

If your sparql engine processes entailments, it should deduce that a ex:Article is also a ex:Publication

so SELECT ?s { ?s rdf:type ex:Publication } would return both ex:book1 AND ex:book2

PS: for more information, the example comes from http://www.w3.org/TR/2009/WD-sparql11-entailment-20091022/

like image 43
Max Avatar answered Oct 21 '22 22:10

Max