query-03163d4a4694a483dd43380606e934b3
Search for missing descriptions in a target language and match with description string SELECT DISTINCT ?item ?itemLabel ?itemDescription WHERE { ?item wdt:P31 wd:Q16521. # instance of human ?item wdt:P105 wd:Q7432. ?item wdt:P171* wd:Q10811. SERVICE wikibase:label { bd:serviceParam wikibase:language "en, fr". }
?item schema:description ?itemdesc2. FILTER(CONTAINS(?itemdesc2, "species of reptile")).
FILTER(NOT EXISTS {
?item schema:description ?itemdesc.
FILTER(LANG(?itemdesc) = "fr") # with missing French description
}).
} order by ?itemLabel
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Search for missing descriptions in a target language and match with description string
SELECT DISTINCT ?item ?itemLabel ?itemDescription WHERE {
?item wdt:P31 wd:Q16521. # instance of human
?item wdt:P105 wd:Q7432.
?item wdt:P171* wd:Q10811.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en, fr". }
?item schema:description ?itemdesc2.
FILTER(CONTAINS(?itemdesc2, "species of reptile")).
FILTER(NOT EXISTS {
?item schema:description ?itemdesc.
FILTER(LANG(?itemdesc) = "fr") # with missing French description
}).
}
order by ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v1("?itemLabel"):::projected
v2("?itemdesc")
v4("?itemdesc2")
c7(["wd:Q7432"]):::iri
c11(["bd:serviceParam"]):::iri
c13(["en, fr"]):::literal
c9(["wd:Q10811"]):::iri
c5(["wd:Q16521"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["?itemdesc = 'fr'"]]
e0f0 --> e0v1
e0v2 --"schema:description"--> e0v1
e0v2("?item"):::projected
e0v1("?itemdesc"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> v3
f0 --> c2
f1[["?itemdesc = 'fr'"]]
f1 --> v2
v3 --"schema:description"--> v2
f2[["contains(?itemdesc2,'species of reptile')"]]
f2 --> v4
v3 --"wdt:P31"--> c5
v3 --"wdt:P105"--> c7
v3 --"wdt:P171"--> c9
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
v3 --"schema:description"--> v4