I want to check if two DBpedia nodes have a path using;
- dct:subject and skos:broader properties
- without specifying properties
For instance consider the two DBpedia nodes; http://dbpedia.org/resource/Cat and http://dbpedia.org/resource/Dog.
Following previous questions related to this in SO, I tried to use the following wildcard query
to do it (without specifying the dct:subject and skos:broader properties).
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.