Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SPARQL-based similarity search – Top entities of type X which share characteristics with Y
SELECT ?s (count(?o) AS ?c) {
{
<Y> ?p ?o .
?s ?p ?o ; a <X>
} UNION {
?o ?p <Y> , ?s .
?s a <X>
}
} GROUP BY ?s ORDER BY DESC(?c) LIMIT 11
You can’t perform that action at this time.