Re: Annotation syntax [was: SPARQL* test suite]

On onsdag 2 september 2020 kl. 13:55:46 CEST Andy Seaborne wrote:
> On 02/09/2020 09:04, Olaf Hartig wrote:
> > Dear all,
> > 
> > I am intrigued by the idea to add a second option to the Turtle* syntax
> > such that PG mode and SA mode can be explicitly distinguished from one
> > another. In fact, now I wonder whether such a distinction can even be
> > built into the RDF* data model (it can, see below).
> > 
> > The only issue with this new "PG mode option" for Turtle* is that it works
> > only for annotations that have the annotated triple in the subject
> > position.> 
> > Take, for instance, Holger's example:
> >> ... instead of
> >> 
> >>       :bob :age 23 .
> >>       
> >>       <<:bob :age 23>> :certainty 0.9 .
> >> 
> >> we can simply (alternatively) write
> >> 
> >>      :bob :age 23 {| :certainty 0.9 |} .
> > 
> > That works. However, the following Turtle* expression (assuming SA mode)
> > cannot be written by using the proposed alternative syntax option.
> > 
> >       :bob :age 23 .
> >       :alice :disbelieves <<:bob :age 23>> .
> > 
> > Perhaps this limitation is not an issue. The notion of edge properties in
> > Property Graphs has the same limitation after all. What do you think?
> 
> I see {|...|} as convenience syntax.
> 
> The same happens with bnodes in the object position - if a bnode is
> object in two triples, you can't use [] notation, you have to use _:label.

Makes sense.
 
> On the syntax :
> 
> what about:
> :bob :age 23 {| :origin
> 
>                     [ :source <http://bob.name/> ;
>                       :retrieved "2020-09-02"^^xsd:date ]
>               |} .

Yeah, I think that we may add this option as well. Good idea.

> > Ignoring this potential issue, I thought a bit about my question from
> > above: Can such an explicit distinction between SA mode and PG mode be
> > built into the RDF* data model itself?
> 
> I need to work though the details in your message but could I ask what I
> do wonder what the value of having the distinction in the formal model,
> compared with, say, a data design pattern "PG mode is SA where each
> referenced <<>> triple is also in the data graph".

The problem is that the assumption of which mode to use would not be explicit 
in this case. For instance, if I put a Turtle* file online, your client does 
not know whether I meant this to be considered in PG mode or in SA mode. By 
using << .. >> exclusively for SA mode and {| ... |} exclusively for PG mode, 
we can be explicit. My proposed formalism carries over this distinction to the 
abstract data model.

Olaf

Received on Wednesday, 2 September 2020 13:17:33 UTC