Re: Is it even possible to align RDF with LPGs via reification?

> On Apr 21, 2024, at 1:04 PM, Luke VanderHart <lvanderhart@modern.energy> wrote:
> 
> Alignment with LPGs is a stated goal for some members of this working
> group. I am curious how they reconcile this with the fact that none of
> the proposed changes actually permit first-class edges, only
> reifications of first-class edges.
> 
> The following example seems to be highly motivating:
> 
> <<#m1 | :liz :marriedTo :richard>> [:from 1964 ; to: 1975] .
> <<#m2 | :liz :marriedTo :richard>> [:from 1980; to: 2001] .

Slight not on syntax: The statement `<<#m1 | :liz :marriedTo :richard>> :from 1964 ; to: 1975 .` (note no []) asserts the following triples:

<#m1> rdf:reifies <<(:liz :marriedTo :richard)>> .
<#m1> :from 1964 .
<#m1> :to 1975 .

The graph may assert elsewhere `:liz :marriedTo :richard .`, but may not. In the LPG case, I would expect that triple to always be asserted, but there are interesting use cases where you want to make a claim about a statement that might not be asserted in the graph, and may not be true in any case.

If you want to both reify and assert a triple, there is the annotation syntax:

:liz :marriedTo :richard {| <#m1> | :from 1964; :to 1975 |} .

The LPG use case IIRC only makes sense with asserted triples.

Reifiers, which indirectly reference the triple term, mirror LPG use cases when there are multiple identical edges which have separate assertions.

> However, querying this graph using Sparql returns no data, because
> neither #m1 nor #m2 are actually asserted in the graph. This is
> probably not what someone from a LPG background would expect.

#m1 and #m2 are asserted in the graph, but :liz :marriedTo :richard may not be asserted in the graph. A SPARQL query can be constructed that will return useful information.

> I can assert the triple, but then the semantics become unclear:
> 
> <<#m1 | :liz :marriedTo :richard>> [:from 1964 ; to: 1975] .
> <<#m2 | :liz :marriedTo :richard>> [:from 1980; to: 2001] .
> :liz :marriedTo :richard .
> 
> Which marriage does the asserted triple represent? The one from 1964,
> the one from 1980, or neither?

This does get into other things under active discussion, such as if a reifier only reifies a statement (triple), or could reify an event. There are other ways to model this in RDF, but in LPG, it may be similar to the following:

(liz)-[:MARRIED {from: 1964, to: 1975}]->(richard) 
(liz)-[:MARRIED {from: 1980, to: 2001}]->(richard) 

In this case, there are two edges from :liz to :richard with different annotations, mirroring the RDF-star statements, but perhaps better stated as 

:liz :marriedTo :richard {| <#m1> | :from 1964; :to 1975 |}
                                     {| <#m2> | :from 1980; :to 2001 |} .

The graph includes a single triple asserting `:liz :marriedTo :richard`, as graphs cannot include duplicated triples. The reifier is necessary to be able to distinguish between different sets of statements on that triple, as LPG allows.

> Is there any mechanism in any of the current proposals to associate
> the asserted triple (which cannot have properties in RDF) with one of
> the reifications?

That is the purpose of the reifier; in RDF, it doesn’t make sense to distinguish between different reifiers as a triple which is part of the graph is true (WRT the graph) regardless of any annotations made about that triple. Of course, this may be an inherently confusing example and may be better to model events and make assertions about those events:

:m1 a :MarriageEvent; :subject :liz, :richard; :from 1965 :to 1975 .
:m2 a :MarriageEvent; :subject :liz, :richard; :from 1980; :to 2001 .

> If there is no such mechanism, are we really aligning with LPGs? Some
> use cases might be covered on the surface, but we can't truly annotate
> asserted edges, we can only annotate statements about edges. This is a
> subtle but meaningful distinction and seems likely to cause confusion
> down the road.

Certainly can be confusing, but I think the LPG case can also be confusing. The only way to talk about edges in RDF is via reification, either the RDF-star version, or using the original Reification vocabulary (rdf:Statement, :subject, :predicate, :object).

Gregg

> Thank you, and my apologies if this point has already been discussed
> and I missed it.
> 
> - Luke VanderHart
> 

Received on Monday, 22 April 2024 01:44:22 UTC