|
From: Artem K. <art...@gm...> - 2017-01-12 18:38:09
|
Hi Adrian, Query that you are trying to parse is not a valid SPARQL query - "The variable introduced by the BIND clause must not have been used in the group graph pattern up to the point of use in BIND. " [https://www.w3.org/TR/sparql11-query/#bind] . Regards, Artem On Wed, Jan 11, 2017 at 3:15 PM, Adrian Bielefeldt < Adr...@ma...> wrote: > Hello everyone, > > I'm writign on behalf of a Wikidata Research Project > <https://meta.wikimedia.org/wiki/Research:Understanding_Wikidata_Queries> > into SPARQL-Queries. We are writing a java application to parse > SPARQL-Queries from the query.wikidata.org-logs and analyse them for > different features. At the moment we are parsing the queries with > org.openrdf.query.parser.QueryParserUtil into > org.openrdf.query.parser.ParsedQuery-Objects. Unfortunatly we cannot > parse queries like this one: > > SELECT DISTINCT ?item > WHERE > { ?tree0 wdt:P31 ?item . BIND (wd:Q146 AS ?tree0) } > > because of: "BIND clause alias '{}' was previously used". > > If we parse them as org.openrdf.query.TupleQuery-Objects using > org.openrdf.repository.RepositoryConnection.prepareTupleQuery they are > parsed just fine. > > Unfortunatly, the TupleQuery-Objects do not support the analysis-Features > of ParsedQuery. > > All of which leads to 2-3 questions: > > 1. Why is this kind of query accepted by one parser but not the other? > 2. Is it possible to obtain a ParsedQuery-Object from a TupleQuery-Object? > (3. Is this the right mailing list to post these questions to?) > > Greetings, > > Adrian Bielefeldt > > ------------------------------------------------------------ > ------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > Bigdata-developers mailing list > Big...@li... > https://lists.sourceforge.net/lists/listinfo/bigdata-developers > > |