Closed alanruttenberg closed 7 years ago
If you've got an EBNF of TERP, it should be straight-forward to generate a YASQE-build just for that. Running the commands described here should set you up with your YASQE version that supports TERP.
Thanks. I don't have ebnf for it but I should be able construct some. The second part of using that syntax is transforming it to standard sparql. Terp syntax lets you write something like an owl class expression for the object of a triple, which then gets translated into the pattern for a restriction, which is a few lines. Is there an obvious place where such a transformation could be effected? The ideal case is when there's already some AST representation. I imagine something like adding the translation as a property of the text span of the expression and a function that substitutes the transformations just before the query is sent off. Otherwise I can route the query through some web service that knows how to do this, though that's less desirable.
Thanks. I don't have ebnf for it but I should be able construct some.
Great. If you update this SPARQL 1.1 grammer def, it should be pretty painless to get the tokenizer in YASQE working. I might (probably not) need to update some of my scripts for e.g. property and class autocompletion, but we'll see that when we get there.
The second part of using that syntax is transforming it to standard sparql. Terp syntax lets you write something like an owl class expression for the object of a triple, which then gets translated into the pattern for a restriction, which is a few lines. Is there an obvious place where such a transformation could be effected? The ideal case is when there's already some AST representation. I imagine something like adding the translation as a property of the text span of the expression and a function that substitutes the transformations just before the query is sent off.
Would you expect any GUI specific things happening here as well? Or should this literally be a JS transformation script that runs right before sending the SPARQL query?
If its the latter, it should be easy to hook the transformation script into the config.sparql.getQueryForAjax
function that modifies the ajax call before sending it to the endpoint (see http://yasqe.yasgui.org/doc/)
Otherwise I can route the query through some web service that knows how to do this, though that's less desirable.
Agree, that's not a very clean solution
@alanruttenberg Did you manage to create a customized YASQE for Terp? (It would be nice to link to from the YASGUI website as a use case of extending the vocabulary.)
I'm closing this one, since no EBNF or similar input to work on has been given.
IMO the way to move forward is for people enthusiastic about the Terp format to first create a customized version of YASQE that uses it. Such a customized version would be a nice way to popularize Terp. Once the format has gained more traction, we can start the conversation about inclusion into the main YASQE distribution.
In this paper we present Terp, a new syntax that combines Turtle and Manchester syntaxes to provide maximum legibility and conciseness when querying OWL with SPARQL. More precisely, Terp syntax allows class, property, and data range expressions, expressed in Manchester syntax, to be used inside SPARQL queries. In this paper, we provide examples to demonstrate how Terp reuses existing features from well-known syntaxes to make SPARQL queries of OWL data more concise and more legible.
http://ceur-ws.org/Vol-614/owled2010_submission_14.pdf