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

On 2/09/2020 09:58, Jeen Broekstra wrote:
>
> On Wed, 2 Sep 2020 at 09:29, Holger Knublauch <holger@topquadrant.com 
> <mailto:holger@topquadrant.com>> wrote:
>
>     Any above syntax would work fine as long as any of them gets de-facto
>     standard support. For now we have used [[ ... ]] in our tools yet
>     this
>     is easy to change, and if this would make it into a future Jena
>     version
>     then we can migrate to that implementation instead of our
>     home-baked hack.
>
>     Does anyone here see problems with adding such a TTL extension?
>
>
> Apart from which particular delimiter we use (no strong opinions on 
> the proposed candidates apart from observing that [[ ]] has potential 
> conflicts, as Andy also pointed out), the approach you suggest tacitly 
> favors PG mode as being more "natural", which is a downside. I also 
> don't quite see how your original dissatisfaction (having to state the 
> triple twice to assert it and its annotation when in SA mode) with the 
> current syntax is solved by this different syntax, except by this 
> "implicit" shift of intent to favor PG mode.
>
> Compare:
>
> <<:bob :age 23>> :certainty 0.9 .
>
> with
>
> :bob :age 23 {| :certainty 0.9 |} .
>
> The focus shifts: in the first syntax variant we are clearly asserting 
> something /about/ Bob's age being 23 (without necessarily asserting 
> that Bob's age _is_ 23), while in the second variant we are saying 
> Bob's age is 23 and then making an annotative "side remark" about that 
> fact being 90% certain.
>
> It's a matter of perception (at the end of the day both objectively 
> express the same information) but I do think it worth pointing this out.
>
> Or do I misunderstand and is the proposal here not to /replace/ the << 
> >> syntax but to allow the second variant /in addition/ to enable 
> explicit "all-in-one" assertion?

Yes, I think so and apologies if I didn't communicate this clearly.

The point here is to *add* an alternative short cut so that instead of


     :bob :age 23 .
     <<:bob :age 23>> :certainty 0.9 .

we can simply (alternatively) write

    :bob :age 23 {| :certainty 0.9 |} .

This would serve as syntactic sugar for the (common) use case of both 
asserting and annotating a triple, while still allowing free-standing 
annotations. The short cut will not only make files significantly 
shorter, but also make editing more user-friendly. The cost is for 
implementers though, who would have to cover an additional case (both in 
parser and serializer).

Holger

Received on Wednesday, 2 September 2020 00:19:10 UTC