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. On Fri, 12 Feb 2021 at 15.05, Mikael Pesonen <[email protected]> wrote:Sorry meant of course to find connections between known nodes, here x and y: ASK { <x> ((<>|!<>)|^(<>|!<>))* <y> } 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 } 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
-- Lingsoft - 30 years of Leading Language Management www.lingsoft.fi Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books Mikael Pesonen System Engineer e-mail: [email protected] Tel. +358 2 279 3300 Time zone: GMT+2 Helsinki Office Eteläranta 10 FI-00130 Helsinki FINLAND Turku Office Kauppiaskatu 5 A FI-20100 Turku FINLAND
