query-9254364d613493bf397d8cc23c466dab
Missing labels Missing labels in a specific language compared to the English label 19:00, 22 December 2016 (UTC)) talk (FlorentynaProbably I am not the first one, who has this problem, but I can't find a solution in the archives. I want to find for P106 with occupation Q13141064 missing labels (later on also descriptions) in other languages. For this reason it would be nice to get as result a table with item, English label and the (latin based) language to be compared with (only items where the label is missing). --
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?itemDescription ?emptyOtherLanguageLabel WHERE {
?item wdt:P106 wd:Q13141064 .
OPTIONAL {
?item rdfs:label ?emptyOtherLanguageLabel .
FILTER( LANG(?emptyOtherLanguageLabel) = "fr" ) .
}
FILTER(!BOUND(?emptyOtherLanguageLabel))
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
Query found at
- https://www.wikidata.org/wiki/User:Florentyna
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2016/12
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?emptyOtherLanguageLabel"):::projected
v2("?item"):::projected
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
c3(["wd:Q13141064"]):::iri
f0[["not bound(?emptyOtherLanguageLabel)"]]
f0 --> v1
v2 --"wdt:P106"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."rdfs:label".-> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end