Re: Find out in data if resources are connected

2021-02-26 Thread james anderson
> On 2021-02-24, at 20:47:06, Andy Seaborne wrote: > > > > On 23/02/2021 20:07, james anderson wrote: > ... > > > ASK is not special in its evaluation of patterns. > > In SELECT and more general path settings: > > What would the answer be? And how many? What if

Re: Find out in data if resources are connected

2021-02-24 Thread Andy Seaborne
On 23/02/2021 20:07, james anderson wrote: ... ASK is not special in its evaluation of patterns. In SELECT and more general path settings: What would the answer be? And how many? What if there are DAGs? why would one not interpret it analogous to { ?z + ?y } What is the analogy?

Re: Find out in data if resources are connected

2021-02-24 Thread james anderson
> On 2021-02-23, at 17:37:52, Andy Seaborne wrote: > > > > On 23/02/2021 15:44, james anderson wrote: >>> On 2021-02-23, at 15:10:23, Andy Seaborne wrote: >>> >>> >>> >>> On 22/02/2021 15:31, james anderson wrote: why did the authors exclude path variables when considering the

Re: Find out in data if resources are connected

2021-02-23 Thread Andy Seaborne
On 23/02/2021 15:44, james anderson wrote: On 2021-02-23, at 15:10:23, Andy Seaborne wrote: On 22/02/2021 15:31, james anderson wrote: why did the authors exclude path variables when considering the alternatives. this formulation appears intuitive. ASK { ?p+ } Which is

Re: Find out in data if resources are connected

2021-02-23 Thread james anderson
> On 2021-02-23, at 15:10:23, Andy Seaborne wrote: > > > > On 22/02/2021 15:31, james anderson wrote: >> why did the authors exclude path variables when considering the alternatives. >> this formulation appears intuitive. >>ASK { ?p+ } > > Which is almost: > > ASK { (!<>)+ }

Re: Find out in data if resources are connected

2021-02-23 Thread Andy Seaborne
On 22/02/2021 15:31, james anderson wrote: why did the authors exclude path variables when considering the alternatives. this formulation appears intuitive. ASK { ?p+ } Which is almost: ASK { (!<>)+ } why was it rejected? Time mostly. discussions appear here and

Re: Find out in data if resources are connected

2021-02-22 Thread james anderson
why did the authors exclude path variables when considering the alternatives. this formulation appears intuitive. ASK { ?p+ } why was it rejected? discussions appear here and elsewhere as to the wildcard predicate expression and its variants. why was it not permitted as a direct

Re: Find out in data if resources are connected

2021-02-22 Thread Mikael Pesonen
Thanks for the suggestion. There seems to be a RDF to Gremlin converter too, so good to know this option. On 12/02/2021 22.13, Martynas Jusevičius wrote: SPARQL is based on pattern matching, so path traversal is not its strong point. You might want to try a different language like Gremlin.

Re: Find out in data if resources are connected

2021-02-13 Thread Andy Seaborne
Minor but "*" -> "+" On 12/02/2021 20:13, Martynas Jusevičius wrote: SPARQL is based on pattern matching, so path traversal is not its strong point. You might want to try a different language like Gremlin. On Fri, 12 Feb 2021 at 15.05, Mikael Pesonen wrote: Sorry meant of course to find

Re: Find out in data if resources are connected

2021-02-12 Thread Martynas Jusevičius
SPARQL is based on pattern matching, so path traversal is not its strong point. You might want to try a different language like Gremlin. On Fri, 12 Feb 2021 at 15.05, Mikael Pesonen wrote: > > Sorry meant of course to find connections between known nodes, here x and > y: > > ASK { >

Re: Find out in data if resources are connected

2021-02-12 Thread Mikael Pesonen
Sorry meant of course to find connections between known nodes, here x and y: ASK {       ((<>|!<>)|^(<>|!<>))*   } On 12/02/2021 15.30, Mikael Pesonen wrote: Hi, is there a more efficient way to find out if two entities are connected? This ASK {       ?s ((<>|!<>)|^(<>|!<>))* ?o   }

Find out in data if resources are connected

2021-02-12 Thread Mikael Pesonen
Hi, is there a more efficient way to find out if two entities are connected? This ASK {       ?s ((<>|!<>)|^(<>|!<>))* ?o   } works for short, couple of relations long, paths but becomes too slow quickly. Maybe something like the list:member method for RDF lists? BR Mikael