query-e12993d758714d0a3263db3a76f255d4
German picture dictionary for young children
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 ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# German picture dictionary for young children
# NB: when 2 or more pictures occur for the same lemma a preferred rank is missing on the Q-item.
# Please fix that if you know how.
# If any inapproriate terms show up it is probably because the sense is missing a correct P5137
# by So9q
#defaultView:ImageGrid
SELECT DISTINCT ?lexemeId ?lemma ?q_concept ?q_conceptDescription ?picture
WHERE {
?lexemeId dct:language wd:Q188; # change language here
wikibase:lemma ?lemma;
ontolex:sense ?sense.
?sense wdt:P5137 ?q_concept.
?q_concept wdt:P18 ?picture.
############
# Exclusions
############
# Exclude out of scope concepts
MINUS {?q_concept wdt:P31 wd:Q3624078.}. # countries
# Exclude non suitable concepts
VALUES ?minus {
wd:Q47092 # rape
wd:Q198 # war
wd:Q124490 # violence
wd:Q170382 # revolver
wd:Q1576 # cigar
#... add yours here
}.
MINUS {?sense wdt:P5137 ?minus.}.
# Exclude senses not suitable for young children:
VALUES ?filter {
wd:Q8102
wd:Q545779
wd:Q1521634
wd:Q184439}.
FILTER NOT EXISTS {?sense wdt:P6191 ?filter.}.
# if you wish to only browse certain items you can insert a FILTER
# regular expression here, like in the example above.
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,mul". }
}
ORDER BY lcase(?lemma) # order a-z
Query found at
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/en
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?filter")
v1("?lemma"):::projected
v4("?lexemeId"):::projected
v7("?minus")
v6("?picture"):::projected
v5("?q_concept"):::projected
v2("?sense")
c13(["de,en,mul"]):::literal
c9(["wd:Q3624078"]):::iri
c11(["bd:serviceParam"]):::iri
c3(["wd:Q188"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P6191"--> e0v2
e0v2("?filter"):::projected
e0v1("?sense"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v8
v2 --"wdt:P6191"--> v8
v4 --"dct:language"--> c3
v4 --"wikibase:lemma"--> v1
v4 --"ontolex:sense"--> v2
v2 --"wdt:P5137"--> v5
v5 --"wdt:P18"--> v6
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v5 --"wdt:P31"--> c9
end
bind2[/VALUES ?minus/]
bind2-->v7
bind20(["wd:Q47092"])
bind20 --> bind2
bind21(["wd:Q198"])
bind21 --> bind2
bind22(["wd:Q124490"])
bind22 --> bind2
bind23(["wd:Q170382"])
bind23 --> bind2
bind24(["wd:Q1576"])
bind24 --> bind2
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P5137"--> v7
end
bind4[/VALUES ?filter/]
bind4-->v8
bind40(["wd:Q8102"])
bind40 --> bind4
bind41(["wd:Q545779"])
bind41 --> bind4
bind42(["wd:Q1521634"])
bind42 --> bind4
bind43(["wd:Q184439"])
bind43 --> bind4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end