Quality control queries: Difference between revisions

From Black Bibliography Project
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
QC Sparql Time
# QC Sparql Time


Get a list of "Item" pages that lack an "instance of" declaration:
 
http://172.17.10.220:8834/index.html#%23%20Return%20all%20items%20that%20lack%20an%20instanceOf%20statement%3F%3F%3F%0Aprefix%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology-beta%23%3E%0A%0ASELECT%20%3Flabel%20%3Flink%0AWHERE%0A%7B%0A%20%3Fx%20rdf%3Atype%20wikibase%3AItem%20%3B%0A%20%20%20%20rdfs%3Alabel%20%3Flabel%20.%0A%20FILTER%28%28LANG%28%3Flabel%29%29%20%3D%20%22en%22%29%0A%20FILTER%20NOT%20EXISTS%20%7B%20%3Fx%20wdt%3AP8%20%3Ftype%20%7D%0A%20BIND%28IRI%28CONCAT%28%27http%3A%2F%2F10.5.32.142%3A8181%2Fwiki%2FItem%3A%27%2C%20REPLACE%28%20str%28%3Fx%29%20%2C%20%27http%3A%2F%2Fwikibase.svc%2Fentity%2F%27%2C%20%27%27%20%29%29%29%20AS%20%3Flink%20%29%0A%7D%0Aorder%20by%20%3Flabel%0A
== Missing instance statements ==
Get a list of Item pages that lack an "instance of" declaration:
<pre>
prefix wikibase: <http://wikiba.se/ontology-beta#>
 
SELECT ?label ?link
WHERE
{
?x rdf:type wikibase: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(?x) , 'http://wikibase.svc/entity/', '' ))) AS ?link )
}
order by ?label
 
 
</pre>
[http://172.17.10.220:8834/index.html#%23%20Return%20all%20items%20that%20lack%20an%20instanceOf%20statement%3F%3F%3F%0Aprefix%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology-beta%23%3E%0A%0ASELECT%20%3Flabel%20%3Flink%0AWHERE%0A%7B%0A%20%3Fx%20rdf%3Atype%20wikibase%3AItem%20%3B%0A%20%20%20%20rdfs%3Alabel%20%3Flabel%20.%0A%20FILTER%28%28LANG%28%3Flabel%29%29%20%3D%20%22en%22%29%0A%20FILTER%20NOT%20EXISTS%20%7B%20%3Fx%20wdt%3AP8%20%3Ftype%20%7D%0A%20BIND%28IRI%28CONCAT%28%27http%3A%2F%2F10.5.32.142%3A8181%2Fwiki%2FItem%3A%27%2C%20REPLACE%28%20str%28%3Fx%29%20%2C%20%27http%3A%2F%2Fwikibase.svc%2Fentity%2F%27%2C%20%27%27%20%29%29%29%20AS%20%3Flink%20%29%0A%7D%0Aorder%20by%20%3Flabel%0A Try it out!]

Revision as of 20:28, 6 December 2020

  1. QC Sparql Time


Missing instance statements

Get a list of Item pages that lack an "instance of" declaration:

prefix wikibase: <http://wikiba.se/ontology-beta#>

SELECT ?label ?link
WHERE
{
 ?x rdf:type wikibase: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(?x) , 'http://wikibase.svc/entity/', '' ))) AS ?link )
}
order by ?label


Try it out!