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

Annotation syntax for SPARQL-star #106

Merged
merged 10 commits into from
Feb 26, 2021
Merged

Conversation

hartig
Copy link
Collaborator

@hartig hartig commented Feb 20, 2021

This PR is meant to address the SPARQL-star part of #9. That is, It adds the extension of the SPARQL-star grammar with the annotation syntax.

(the changes in this PR are copied over from #65 which was based on the old organization of files in the repo)


Preview | Diff

@hartig hartig added the sparql-star About SPARQL-star label Feb 20, 2021
@hartig
Copy link
Collaborator Author

hartig commented Feb 20, 2021

Open TODOs in this PR:

  • adding the text note saying "If annotation, must be simple path"
  • perhaps another note to highlight that property path patterns can be used within the annotation part

@afs
Copy link
Collaborator

afs commented Feb 20, 2021

There is one simplification that can be done. Rather than the ObjectList rules, and use the annotation production twice, it can go on Object...

ObjectPath  ::=  GraphNode AnnotationPatternPath?

Object  ::=  GraphNode AnnotationPattern?

which is mention once.

(Note that Collection uses GraphNodeetc ).

@afs
Copy link
Collaborator

afs commented Feb 20, 2021

  • adding the text note saying "If annotation, must be simple path"
  • perhaps another note to highlight that property path patterns can be used within the annotation part

To go with this, I've raised #107 to add tests to the SPARQL-star syntax test suite.

@hartig
Copy link
Collaborator Author

hartig commented Feb 20, 2021

Great idea Andy! I have implemented these simplifications now.

@hartig hartig mentioned this pull request Feb 20, 2021
@hartig
Copy link
Collaborator Author

hartig commented Feb 21, 2021

I have addressed the remaining two TODOs now. The new parts are the additional paragraphs below the actual grammar in Section 4.2. Additionally, I have extended the example for the corresponding expansion rule in Section 4.3.2 (to highlight once more the possibility of having path expressions inside the annotation patterns).

@afs can you please take a look.

@afs
Copy link
Collaborator

afs commented Feb 22, 2021

Text looks good. I don't think it really needs to say as much about expanding prefixed name and triple forms, much too diligent! (bullets 2 and 3 in 4.3.2). But the text is there so it can stay.

cg-spec/editors_draft.html Outdated Show resolved Hide resolved
cg-spec/editors_draft.html Outdated Show resolved Hide resolved
hartig and others added 2 commits February 23, 2021 12:54
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
@hartig hartig added the discuss-in-meeting Should be addressed in the coming meeting(s) label Feb 24, 2021
@afs
Copy link
Collaborator

afs commented Feb 24, 2021

There are 3 syntax forms (some with variations) that have been discussed. While there has been some advocacy from a few people, there does not seem to be a leading candidate in the community as a whole.

We have

:s :p :o @{ :p :z } .
  • + { } not in Turtle
  • - In TriG and SPARQL, { } is about triples, not a predicate-object-list
  • - "literal"@ is a language tag.
:s :p :o @[ :p :z ] .
  • + It is predicate-object-list.
  • - [ ] is suggestive of blank nodes.
  • - "literal"@ is a language tag.
:s :p :o {| :p :z |} .
  • + Unique delimiters
  • - { is a graph in TriG

@gkellogg
Copy link
Member

I'm pretty used to {| ... |} now and definitely favor a symmetric beginning/ending such as this. That combination of characters is unlikely to be confused with anything else, as long as the token {| is examined before {, which is similar to other sequences where a pair of characters takes precedence over a single character (e.g., : <= vs <, != vs ! in SPARQL).

Co-authored-by: Gregg Kellogg <gregg@greggkellogg.net>
@hartig
Copy link
Collaborator Author

hartig commented Feb 26, 2021

Based on the agreement in the telco today, I am merging this PR now.

@hartig hartig merged commit 9fbde7b into main Feb 26, 2021
@gkellogg gkellogg deleted the AnnotationSyntaxForSparqlStar2 branch November 13, 2021 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss-in-meeting Should be addressed in the coming meeting(s) sparql-star About SPARQL-star
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants