Quality control queries: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 5: | Line 5: | ||
Get a list of Item pages that lack an "instance of" declaration: | Get a list of Item pages that lack an "instance of" declaration: | ||
<pre> | <pre> | ||
SELECT ?label ?link | SELECT ?label ?link | ||
WHERE | WHERE | ||
{ | { | ||
? | ?item rdfs:label ?label . | ||
FILTER((LANG(?label)) = "en") | FILTER((LANG(?label)) = "en") | ||
FILTER NOT EXISTS { ?x wdt:P8 ?type } | FILTER NOT EXISTS { ?x wdt:P8 ?type } | ||
BIND(IRI(CONCAT('http://172.17.10.220/wiki/Item:', REPLACE( str(? | BIND(IRI(CONCAT('http://172.17.10.220/wiki/Item:', REPLACE( str(?item) , 'http://wikibase.svc/entity/', '' ))) AS ?link ) | ||
} | } | ||
order by ?label | order by ?label | ||
</pre> | </pre> | ||
[http:// | [http://www Try it out!] | ||
== Places without a Wikidata identifier (also check if they are really places) == | == Places without a Wikidata identifier (also check if they are really places) == |
Revision as of 17:50, 8 December 2020
Missing instance statements
Get a list of Item pages that lack an "instance of" declaration:
SELECT ?label ?link WHERE { ?item rdfs:label ?label . FILTER((LANG(?label)) = "en") FILTER NOT EXISTS { ?x wdt:P8 ?type } BIND(IRI(CONCAT('http://172.17.10.220/wiki/Item:', REPLACE( str(?item) , 'http://wikibase.svc/entity/', '' ))) AS ?link ) } order by ?label
Places without a Wikidata identifier (also check if they are really places)
# Return all places that lack a Wikidata identifier. SELECT ?itemLabel ?link WHERE { ?item wdt:P8 wd:Q10 ; rdfs:label ?itemLabel FILTER NOT EXISTS { ?item wdt:p107 ?id } BIND(IRI(CONCAT('http://172.17.10.220/wiki/Item:', REPLACE( str(?item) , 'http://wikibase.svc/entity/', '' ))) AS ?link ) } order by ?itemLabel