Warning:
This wiki has been archived and is now read-only.
Authority SPARQL Examples
From Library Linked Data
Selecting an LC authority preferred label for a DBpedia entity using VIAF
SPARQL query for selecting the Library of Congress preferred label for a person identified in DBpedia (Jane Austen):
SELECT ?prefLabel WHERE { ?concept foaf:focus ?thing ; skos:inScheme <http://viaf.org/authorityScheme/LC> ; skos:prefLabel ?prefLabel . ?thing owl:sameAs <http://dbpedia.org/resource/Jane_Austen> ;
}
Listing available preferred labels for a DBpedia entity using VIAF
SPARQL query for listing all available preferred labels for DBpedia's Jane Austen:
SELECT ?conceptScheme ?prefLabel WHERE { ?concept skos:prefLabel ?prefLabel ; skos:inScheme ?conceptScheme ; foaf:focus ?thing. ?thing owl:sameAs <http://dbpedia.org/resource/Jane_Austen> . }
Thesaurus Concept Lookup
Thesaurus concept lookup, with hints from alt labels to (english) pref labels (query underlying stw-ws /suggest service)
SELECT DISTINCT ?term ?concept ?prefLabel WHERE { { ?concept skos:prefLabel ?term . } UNION { ?concept skos:altLabel ?term . } UNION { ?concept skos:hiddenLabel ?term . } . FILTER (regex(str(?term), "^acc", "i")) . ?concept skos:prefLabel ?prefLabel . FILTER (langMatches(lang(?prefLabel), "en")) . } ORDER BY ?term LIMIT 10