User:DBpedia-Bot/UsefulSparqlQueries
Useful SPARQL queries
editThis page collects SPARQL queries for the DBpedia Live Extraction. Most of them give examples of how to query specific T-Box parts with the help of annotations. The queries can be executed here: http://dbpedia-live.openlinksw.com/sparql default-graph: http://dbpedia.org/meta
Retrieve the DBpedia Ontology
editPREFIX meta: <http://dbpedia.org/meta/> CONSTRUCT {?s ?p ?o} WHERE { ?b meta:origin meta:TBoxExtractor . ?b owl:annotatedSource ?s . ?b owl:annotatedProperty ?p . ?b owl:annotatedTarget ?o . FILTER(!(?p IN ( meta:editlink, meta:editLink, meta:revisionlink, meta:revisionLink, meta:oaiidentifier, meta:oaiidentifier, <http://http://purl.org/dc/terms/modified> ))).
Retrieve the DBpedia Ontology without disjointWith and equivalentClass Axioms
editNote: these axioms have the potential to render the ontology inconsistent
PREFIX meta: <http://dbpedia.org/meta/> PREFIX owl: <http://www.w3.org/2002/07/owl#> CONSTRUCT {?s ?p ?o} WHERE { ?b meta:origin meta:TBoxExtractor . ?b meta:aspect ?aspect . ?b owl:annotatedSource ?s . ?b owl:annotatedProperty ?p . ?b owl:annotatedTarget ?o . FILTER(!(?p IN ( meta:editlink, meta:editLink, meta:revisionlink, meta:revisionLink, meta:oaiidentifier, meta:oaiidentifier, <http://http://purl.org/dc/terms/modified> ))). FILTER (!(?aspect IN( owl:equivalentClass, owl:disjointWith ))). }