Quality control queries: Difference between revisions
No edit summary |
|||
| Line 91: | Line 91: | ||
</pre> | </pre> | ||
==Issues== | |||
=== Missing "issue of" statements === | |||
Get a list of copies that lack an "copy of" statement: | Get a list of copies that lack an "copy of" statement: | ||
| Line 108: | Line 107: | ||
</pre> | </pre> | ||
==Translations== | |||
=== Missing "translation of" statements === | |||
Get a list of translated works that lack an "translation of" statement: | Get a list of translated works that lack an "translation of" statement: | ||
| Line 124: | Line 123: | ||
</pre> | </pre> | ||
=== Missing Language Statements === | |||
Get a list of translated works that lack a "language" statement: | Get a list of translated works that lack a "language" statement: | ||
| Line 139: | Line 138: | ||
</pre> | </pre> | ||
== Oration == | |||
=== Missing "oration of" statements === | |||
Get a list of oration that lack an "oration of" statement: | Get a list of oration that lack an "oration of" statement: | ||
| Line 155: | Line 154: | ||
</pre> | </pre> | ||
=== Missing "Orator" statements === | |||
Get a list of oration that lack an "orator" statement: | Get a list of oration that lack an "orator" statement: | ||
| Line 170: | Line 169: | ||
</pre> | </pre> | ||
== Missing instance statements (NEEDS REVISION) == | == Missing instance statements (NEEDS REVISION) == | ||
Revision as of 15:32, 10 June 2025
Missing Required Statements
Works
Missing Literary Form
Get a list of works that lack an accurate "Literary Form" statement:
# Works without accurate Instance of statement.
SELECT ?work ?workLabel
WHERE
{
?work wdt:P8 wd:Q4 .
MINUS { ?work wdt:P11 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?workLabel
Missing Language
Get a list of works that lack an "language" statement:
# Works without Language statement.
SELECT ?edition ?editionLabel
WHERE
{
?edition wdt:P8 wd:Q4 .
MINUS { ?edition wdt:P12 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?editionLabel
Editions
Missing "edition of" statements
Get a list of editions that lack an "edition of" statement:
# Editions without Edition of statement.
SELECT ?edition ?editionLabel
WHERE
{
?edition wdt:P8 wd:Q7 .
MINUS { ?edition wdt:P13 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?editionLabel
Missing Format Statements
Get a list of editions that lack a "Format" statement:
# Editions without Format statement.
SELECT ?edition ?editionLabel
WHERE
{
?edition wdt:P8 wd:Q7 .
MINUS { ?edition wdt:P37 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?editionLabel
Copies
Missing "copy of" statements
Get a list of copies that lack an "copy of" statement:
# Copies without Copy of statement.
SELECT ?copy ?copyLabel
WHERE
{
?copy wdt:P8 wd:Q8 .
MINUS { ?copy wdt:P41 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?copyLabel
Missing "Held By" Statements
Get a list of copies that lack an "copy of" statement:
# Copies without Copy of statement.
SELECT ?copy ?copyLabel
WHERE
{
?copy wdt:P8 wd:Q8 .
MINUS { ?copy wdt:P43 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?copyLabel
Issues
Missing "issue of" statements
Get a list of copies that lack an "copy of" statement:
# Issues without Issue of statement.
SELECT ?issue ?issueLabel
WHERE
{
?issue wdt:P8 wd:Q739 .
MINUS { ?issue wdt:P111 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?issueLabel
Translations
Missing "translation of" statements
Get a list of translated works that lack an "translation of" statement:
# Translations without Translation of statement.
SELECT ?issue ?issueLabel
WHERE
{
?translation wdt:P8 wd:Q2634 .
MINUS { ?translation wdt:P130 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?translationLabel
Missing Language Statements
Get a list of translated works that lack a "language" statement:
# Translations without Translation of statement.
SELECT ?issue ?issueLabel
WHERE
{
?translation wdt:P8 wd:Q2634 .
MINUS { ?translation wdt:P12 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?translationLabel
Oration
Missing "oration of" statements
Get a list of oration that lack an "oration of" statement:
# Orations without Oration of statement.
SELECT ?oration ?orationLabel
WHERE
{
?oration wdt:P8 wd:Q8757 .
MINUS { ?oration wdt:P142 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?orationLabel
Missing "Orator" statements
Get a list of oration that lack an "orator" statement:
# Orations without Oration of statement.
SELECT ?oration ?orationLabel
WHERE
{
?oration wdt:P8 wd:Q8757 .
MINUS { ?oration wdt:P141 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?orationLabel
Missing instance statements (NEEDS REVISION)
Get a list of Item pages that lack an "instance of" declaration:
# Return all items that are missing an "instance of" statement
prefix wbb: <http://wikiba.se/ontology-beta#>
prefix wb: <http://wikiba.se/ontology#>
SELECT ?label ?link
WHERE
{
?item rdf:type ?wbitem ;
rdfs:label ?label .
FILTER(?wbitem in (wbb:Item, wb:Item))
FILTER((LANG(?label)) = "en")
FILTER NOT EXISTS { ?item 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
Missing Wikidata Identifiers
Humans Without a Wikidata Identifier
# Humans without a Wikidata Identifier.
SELECT ?human ?humanLabel
WHERE
{
?place wdt:P8 wd:Q3 .
MINUS { ?place wdt:P107 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?humanLabel
Corporate Bodies Without a Wikidata Identifier
# Corporate Bodies Without a Wikidata Identifier.
SELECT ?corp ?corpLabel
WHERE
{
?place wdt:P8 wd:Q186 .
MINUS { ?place wdt:P107 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?corpLabel
Places Without a Wikidata Identifier
# Places without a Wikidata Identifier.
SELECT ?place ?placeLabel
WHERE
{
?place wdt:P8 wd:Q10 .
MINUS { ?place wdt:P107 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?placeLabel
Missing Library of Congress Authority IDs
Humans Without a Library of Congress Authority ID
# Humans without a LOC Identifier.
SELECT ?human ?humanLabel
WHERE
{
?place wdt:P8 wd:Q3 .
MINUS { ?place wdt:P107 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?humanLabel
Corporate Bodies Without a Library of Congress Authority ID
# Corporate Bodies Without a LOC Identifier.
SELECT ?corp ?corpLabel
WHERE
{
?place wdt:P8 wd:Q186 .
MINUS { ?place wdt:P108 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?corpLabel
Places Without a Library of Congress Authority ID
# Places without a LOC Identifier.
SELECT ?place ?placeLabel
WHERE
{
?place wdt:P8 wd:Q10 .
MINUS { ?place wdt:P108 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?placeLabel
Checking in on the Andrews List editions (NEEDS REVISION)
# list of editions associated with the Andrews bibliography
SELECT
?editionLabel
?link
(group_concat(distinct ?publisherLabel;separator='; ') as ?publishers)
(group_concat(distinct ?pubPlaceLabel;separator='; ') as ?publishedPlaces)
(group_concat(distinct ?pubDate;separator='; ') as ?publishedDates)
(group_concat(distinct ?printerLabel;separator='; ') as ?printers)
(group_concat(distinct ?printPlaceLabel;separator='; ') as ?printedPlaces)
(group_concat(distinct ?printDate;separator='; ') as ?printedDates)
WHERE {
?edition wdt:P121 wd:Q1176 ; #wd:Q1176 is the Andrews bibliography
rdfs:label ?editionLabel .
OPTIONAL {?edition wdt:P29 ?publisher . ?publisher rdfs:label ?publisherLabel }.
OPTIONAL {?edition ?has ?pubStmt . ?pubStmt ps:P29 ?publisher ; pq:P30 ?pubPlace . ?pubPlace rdfs:label ?pubPlaceLabel }.
OPTIONAL {?edition ?has ?pubStmt . ?pubStmt ps:P29 ?publisher ; pq:P31 ?pubDate }.
OPTIONAL {?edition wdt:P32 ?printer . ?printer rdfs:label ?printerLabel }.
OPTIONAL {?edition ?has ?printStmt . ?printStmt ps:P32 ?printer ; pq:P30 ?printPlace . ?printPlace rdfs:label ?printPlaceLabel }.
OPTIONAL {?edition ?has ?printStmt . ?printStmt ps:P32 ?printer ; pq:P31 ?printDate }.
BIND(IRI(CONCAT('http://172.17.10.220/wiki/Item:', REPLACE( str(?edition) , 'http://wikibase.svc/entity/', '' ))) AS ?link )
}
group by ?editionLabel ?link
Incorrectly Linked Statements (NEEDS REVISION)
"Edition of" Statements
Get a list of editions that include an "edition of" statement for something other than a work:
"Copy of" Statements
Get a list of copies that include a "copy of" statement for something other than an edition or issue:
"Issue of" Statements
Get a list of serial issues that include an "issue of" statement for something other than a serial: