Endpoint: https://dbpedia.org/sparql
Last active
July 6, 2020 15:06
-
-
Save mommi84/8fad588871e3921caae85c7bb1ebc344 to your computer and use it in GitHub Desktop.
Differences between entities in SPARQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list all differences between two entities, filtered by certain properties | |
SELECT * WHERE { | |
{ | |
<http://dbpedia.org/resource/Nevada> ?p ?o1 | |
MINUS { <http://dbpedia.org/resource/Lincoln_County,_Nevada> ?p ?o1 } | |
} UNION { | |
<http://dbpedia.org/resource/Lincoln_County,_Nevada> ?p ?o2 | |
MINUS { <http://dbpedia.org/resource/Nevada> ?p ?o2 } | |
} | |
VALUES(?p) { (rdf:type) (<http://purl.org/linguistics/gold/hypernym>) } | |
} ORDER BY ?p ?o2 ?o1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment