Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vocabulary to refer to the individual nodes in a triple term #130

Open
rat10 opened this issue Sep 24, 2024 · 5 comments
Open

vocabulary to refer to the individual nodes in a triple term #130

rat10 opened this issue Sep 24, 2024 · 5 comments

Comments

@rat10
Copy link
Contributor

rat10 commented Sep 24, 2024

Edit: see an update to this proposal below, changing annotation properties to rdf:onSubject, rdf:onPredicateand rdf:onObject.

We should define a vocabulary to refer to the individual subject, predicate and object that a triple term is composed of. That would bring triple terms much closer to the expressivity of LPG, and would be quite beneficial in its own right.
The issue is more thoroughly discussed in the recent email "statements about statements".

Technically the answer to this question depends on the resolution to the unstar mapping, see issue #114 . IFF we settle for an unstar mapping based on RDF standard reification as proposed there, e.g. in the following comment, then the question can be discussed more concretely.
Given the (shortened) example from the cited comment that proposes an unstar mapping based on RDF standard reification:

<Alice> :bought <LennyTheLion> .

[] rdf:reifies _:b1 ;
    :seller :ToyStore .

_:b1 a rdf:Triple ;
    rdf:subject <Alice> ;
    rdf:predicate :bought ;
    rdf:object <LennyTheLion> .

Question 1: would the following constitute an annotation on the predicate of the reified statement?

<Alice> :bought <LennyTheLion> .

[] rdf:reifies _:b1 ;
    :seller :ToyStore .

_:b1 a rdf:Triple ;
    rdf:subject <Alice> ;
    rdf:predicate :bought ,
                  [ :payment <Cash> ] ;
    rdf:object <LennyTheLion> .

Question 2: would the following representation of the annotation as triple term be equivalent?

# n-triples
<Alice> :bought <LennyTheLion> .
_:r rdf:reifies <<( <Alice> :bought <LennyTheLion> )>> ;
    :seller :ToyStore  ;
    rdf:predicate [ :payment <Cash> ] .

# turtle-star annotation syntax
<Alice> :bought <LennyTheLion> 
    {| :seller :ToyStore  ;.
       rdf:predicate [ :payment <Cash> ]
     |} .

If both questions can be answered with yes, then we do not need a new vocabulary to refer to the individual nodes (subject. predicate, object) of a reified triple term.

If this doesn't work then we should consider a new set of properties to this effect, as discussed in the mail "statements about statements", e.g.:

<Alice> :bought <LennyTheLion> 
    {|  :seller :ToyStore  ;.
         rdf:onPredicate [ :payment <Cash> ]
     |} .
@TallTed
Copy link
Member

TallTed commented Sep 24, 2024

What's wrong with rdf:subject, rdf:predicate, rdf:object?

ex:r  rdf:reifies    <<( ex:s  ex:p  ex:o )>>  .

# I suggest that the next three triples -- classic reification -- be 
# optional automatic insertions upon insertion of the `rdf:reifies` above.
ex:r  rdf:subject    ex:s  .
ex:r  rdf:predicate  ex:p  .
ex:r  rdf:object     ex:o  .

# the next triple is optional, as it puts the triple in the graph (i.e., asserts it)
ex:s  ex:p           ex:o  .

@pfps pfps added the discuss-f2f Proposed for discussion during the next face-to-face meeting label Sep 25, 2024
@rat10
Copy link
Contributor Author

rat10 commented Sep 25, 2024

@TallTed That's a valid question! We discussed this briefly in a Semantics TF meeting a few weeks ago and some expressed concerns w.r.t. re-using the reification vocabulary. This needs more discussion and probably is related to the question how the un-star mapping is defined (where there are also arguments pro and contra just re-using the reification vocab). Personally I'm pretty agnostic to which properties we use in the end. I just want to make sure that the issue is addressed in the spec.

@afs
Copy link
Contributor

afs commented Sep 26, 2024

Related: w3c/rdf-semantics#49

@rat10
Copy link
Contributor Author

rat10 commented Oct 21, 2024

Updated proposal

We should define a vocabulary to refer to the individual subject, predicate and object that a triple term is composed of. That would bring triple terms much closer to the expressivity of LPG, and would be quite beneficial in its own right.
The idea is more thoroughly discussed in the email "statements about statements".

The following example illustrates how annotations on individual nodes (a node being a subject, predicate or object of a triple) can be realized:

<Alice> :bought <LennyTheLion> .

[] rdf:reifies <<( <Alice> :bought <LennyTheLion> )>> ;
    :purpose <Gift> ;
    rdf:onSubject [ :age 12 ] ;
    rdf:onPredicate [ :payment <Cash> ] ;
    rdf:onObject [ a <Puppet> ] .

The equivalent in Turtle-star annotation syntax:

<Alice> :bought <LennyTheLion> {|
        :purpose <Gift>  ;
        rdf:onSubject [ :age 12 ] ;
        rdf:onPredicate [ :payment <Cash> ] ;
        rdf:onObject [ a <Puppet> ] 
    |} .

The initial proposal above discussed the viability of the approach in principle and, as an implementaion aspect, the re-use of the RDF standard reification vocabulary, namely the properties rdf:subject, rdf:predicate and rdf:object.

The discussion in the 18/10/2024 Semantics TaskForce meeting seemed to confirm that the approach in general is feasible. However for the following reasons it seems more appropriate to mint a specific vocabulary, e.g. rdf:onSubject, rdf:onPredicateand rdf:onObject:

  • the RDF-star unstar-mapping is likely to not be based on the RDF reification vocabulary but get a new set of properties (e.g. rdf:tripleTermSubject, rdf:tripleTermPredicate and rdf:tripleTermObject), so basing references to individual nodes of RDF-star refiers on it might seem confusing
  • the RDF-star unstar-mapping describes abstract types, not reified occurrences, so that new vocabulary can't be used
  • this way to model annotations on individual components of a triple is rather new to RDF, so minting new properties might be a sensible way to introduce it.

Nonetheless, it seems that there is no definitive reason why the RDF reification vocabulary can't be used. Therefore it's possible that the choice of vocabulary will change again upon further discussion.


EDIT: updated `rdf:tripleSubject` to `rdf:tripleTermSubject`, etc

@afs
Copy link
Contributor

afs commented Oct 21, 2024

w3c/rdf-semantics#49 uses tripleTermSubject etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants