query-1db0d55edfc626d36bc6f8217fdb4457
Stolperstein labels
Use at
- https://query.wikidata.org/sparql
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#>
select (replace(str(?stolperstein), str(wd:), "") as ?qid) (concat("L", ?lang) as ?pid) (concat(""", ?prefix, ?name, """) as ?label) where {
?stolperstein wdt:P31 wd:Q26703203;
rdfs:label ?Lde.
filter(lang(?Lde) = "de")
bind(replace(?Lde, "Stolperstein für ", "") as ?name)
values (?lang ?prefix ?cond) {
("en" "Stolperstein dedicated to " "")
("pt" "Stolperstein em memória de " "")
("es" "Stolperstein en memoria de " "")
("fr" "Stolperstein à la mémoire de " "^[^AEIOUY]")
("fr" "Stolperstein à la mémoire d’" "^[AEIOUY]")
}
filter(strstarts(?Lde, "Stolperstein für "))
filter(!regex(?name, "^(den|die|das|Unbekannt|Zwangsarbeiter|\\d)"))
filter(regex(?name, ?cond, "i"))
filter not exists {
?stolperstein rdfs:label ?l.
filter(lang(?l) = ?lang)
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?Lde")
v8("?cond")
v1("?l")
v10("?label")
v7("?lang"):::projected
v7("?name")
v9("?pid")
v7("?prefix")
v8("?qid")
v3("?stolperstein"):::projected
c7(["wd:Q26703203"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["?l = ?lang"]]
e0f0 --> e0v1
e0f0 --> e0v2
e0v3 --"rdfs:label"--> e0v1
e0v1("?l"):::projected
e0v2("?lang"):::projected
e0v3("?stolperstein"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> v7
f0 --> v3
f0 --> c1
f1[["?l = ?lang"]]
f1 --> v1
f1 --> v7
v3 --"rdfs:label"--> v1
f2[["regex(?name,?cond,'i')"]]
f2 --> v7
f2 --> v8
f3[["not regex(?name,'^(den|die|das|Unbekannt|Zwangsarbeiter|\d)')"]]
f3 --> v7
f4[["starts-with(?Lde,'Stolperstein für ')"]]
f4 --> v6
f5[["?Lde = 'de'"]]
f5 --> v6
v3 --"wdt:P31"--> c7
v3 --"rdfs:label"--> v6
bind6[/"replace(?Lde,'Stolperstein für ','')"/]
v6 --o bind6
bind6 --as--o v7
bind7[/VALUES ?cond ?lang ?prefix/]
bind7-->v7
bind7-->v7
bind7-->v8
bind70(["en"])
bind70 --> bind7
bind71(["Stolperstein dedicated to "])
bind71 --> bind7
bind72([""])
bind72 --> bind7
bind73(["pt"])
bind73 --> bind7
bind74(["Stolperstein em memória de "])
bind74 --> bind7
bind75([""])
bind75 --> bind7
bind76(["es"])
bind76 --> bind7
bind77(["Stolperstein en memoria de "])
bind77 --> bind7
bind78([""])
bind78 --> bind7
bind79(["fr"])
bind79 --> bind7
bind710(["Stolperstein à la mémoire de "])
bind710 --> bind7
bind711(["^#91;^AEIOUY#93;"])
bind711 --> bind7
bind712(["fr"])
bind712 --> bind7
bind713(["Stolperstein à la mémoire d’"])
bind713 --> bind7
bind714(["^#91;AEIOUY#93;"])
bind714 --> bind7
bind8[/"replace(str(?stolperstein),str('wd:'),'')"/]
v3 --o bind8
bind8 --as--o v8
bind9[/"concat('L',?lang)"/]
v7 --o bind9
bind9 --as--o v9
bind10[/"concat(', ?prefix, ?name, ')"/]
bind10 --as--o v10