Re: Equality of RDF bags

Hiya, 

On 1 Nov 2011, at 06:30, Martin Hepp wrote:

> Hi Aidan,
>> RDF semantics would not consider the two blank-nodes in the example to be the "same entity" since one is the price-specification of foo:offer1 and the other is the price-specification of foo:offer2. This distinguishes them apart: the result of merging the two examples above is lean.
>> 
>> ...this doesn't necessarily invalidate your original point about blank-nodes, but you need different examples.
> 
> So are you saying that my example could be correctly merged into
> 
> foo:offer1 a gr:Offering;
>    gr:name "ACME Laptop" ;
>    gr:hasPriceSpecification _:a1234.
> 
> foo:offer2 a gr:Offering;
>    gr:name "ACME Semantic Web Services Book" ;
>    gr:hasPriceSpecification _:a1234.
> 
> _:a1234 a gr:UnitPriceSpecification;
>    	gr:hasCurrency "USD"^^xsd:string;
>    	gr:hasCurrencyValue "9.90"^^xsd:float;
>    	gr:hasUnitOfMeasurement "C62"^^xsd:string. 
> 
> ?
> I am not sure about the formal RDF semantics, but my modeling intuition says that this implies that both offers where referring to a common entity for the price, which is not what my original graph represents. My original graph just indicates that they are referring to price nodes that have the same properties.
> 
> Take for example
> 
> foo:man1 a foo:Man;
> 	rdfs:label "Peter" ;
> 	foo:marriedTo [ a foo:Woman ;
> 			rdfs:label "Susi"].
> 
> foo:man2 a foo:Man;
> 	rdfs:label "Paul" ;
> 	foo:marriedTo [ a foo:Woman ;
> 			rdfs:label "Susi"].
> 
> Merging this into
> 
> foo:man1 a foo:Man;
> 	rdfs:label "Peter" ;
> 	foo:marriedTo _:suzy .
> 
> foo:man2 a foo:Man;
> 	rdfs:label "Paul" ;
> 	foo:marriedTo _:suzy .
> 
> _:suzy a foo:Woman ;
>       rdfs:label "Susi".

As far as I am aware, bnodes are scoped to documents, but that is an aside. Leaning can only be applied when the bnodes have the same edges in a graph. So in your example above, the following (bold) triples mean that they are different bnodes: 

foo:man2 foo:marriedTo _:bnode0 . 
 _:bnode0 a foo:Woman .
 _:bnode0 rdfs:label "Susy" .

and 

foo:man1 foo:marriedTo _bnode1 . 
 _:bnode1 a foo:Woman .
 _:bnode1 rdfs:label "Susy" .

Finally, I am not aware of any RDF/SPARQL stores which do leaning, am not sure it happens much in practice, but I could be wrong.

Mischa

> 
> would suggest that they are both married to the same woman called Suzy; a statement that is not contained in the original graph.
> 
> Martin
> 
> 
> On Oct 31, 2011, at 8:38 PM, aidan.hogan wrote:
> 
>> Hi Martin,
>> 
>> Forgive a quick nitpick:
>> 
>> On 28/10/2011 19:24, Martin Hepp wrote:
>>> Note that two blank nodes having the same attributes and the same type may still represent two distinct entities with a different identity. In particular if you think of changing RDF data (SPARUL updates, this can be an important distinction.
>>> 
>>> For instance, if in GoodRelations, two items momentarily have the same price, e.g.
>>> 
>>> foo:offer1 a gr:Offering;
>>>    gr:name "ACME Laptop" ;
>>>    gr:hasPriceSpecification [
>>>        a gr:UnitPriceSpecification;
>>>    	gr:hasCurrency "USD"^^xsd:string;
>>>    	gr:hasCurrencyValue "9.90"^^xsd:float;
>>>    	gr:hasUnitOfMeasurement "C62"^^xsd:string ] .
>>> 
>>> foo:offer2 a gr:Offering;
>>>    gr:name "ACME Semantic Web Services Book" ;
>>>    gr:hasPriceSpecification [
>>>        a gr:UnitPriceSpecification;
>>>    	gr:hasCurrency "USD"^^xsd:string;
>>>    	gr:hasCurrencyValue "9.90"^^xsd:float;
>>>    	gr:hasUnitOfMeasurement "C62"^^xsd:string ] .
>>> 
>>> Then you should not infer that both have the same entity representing the unit price, because these may evolve differently, so you should not infer that they have the same price, but just that their anonymous price node has currently the exact same attributes. But sameness in type and attributes does not say anything about whether this is the same entity, as long as the descriptions of each node are incomplete, which is always the case.
>> 
>> RDF semantics would not consider the two blank-nodes in the example to be the "same entity" since one is the price-specification of foo:offer1 and the other is the price-specification of foo:offer2. This distinguishes them apart: the result of merging the two examples above is lean.
>> 
>> ...this doesn't necessarily invalidate your original point about blank-nodes, but you need different examples.
>> 
>> Cheers,
>> Aidan
>> 
> 
> 

_________________________________
Mischa Tuffield
Email: mmt04r@ecs.soton.ac.uk
Homepage: http://mmt.me.uk/
WebID: http://mmt.me.uk/foaf.rdf#mischa

Received on Tuesday, 1 November 2011 14:02:35 UTC