I want to check if two DBpedia nodes have a path using;
dct:subject
andskos:broader
properties- without specifying properties
For instance consider the two DBpedia nodes http://dbpedia.org/resource/Cat
and http://dbpedia.org/resource/Dog
. I tried to use the following wildcard query to do it.
ASK {
<http://dbpedia.org/resource/Cat> ((<>|!<>)|^(<>|!<>))* <http://dbpedia.org/resource/Dog>
}
However, I get a memory error. I am wondering if there is a more suitable way of doing this in sparql.
I am happy to provide more details if needed.