query-ba334ec52bbc2843d6e2a76a5b4f868e

rq turtle/ttl

by CamelCaseNick select (replace(str(?stolperstein), str(wd:), "") as ?qid) ?Ade where { ?stolperstein wdt:P31 wd:Q26703203; rdfs:label ?de. filter(lang(?de) = "de") filter(regex(?de, "^Stolperstein für (\p{L}+) \p{L}\. (\p{L}+)$")) bind(replace(?de, "^Stolperstein für (\p{L}+) \p{L}\. (\p{L}+)$", "$1 $2") as ?name) bind(concat("Stolperstein für ", ?name) as ?Ade) filter not exists { ?stolperstein skos:altLabel ?alias. filter(?alias = strlang(?Ade, "de")) } }

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#by CamelCaseNick
select (replace(str(?stolperstein), str(wd:), "") as ?qid) ?Ade where {
  ?stolperstein wdt:P31 wd:Q26703203;
                rdfs:label ?de.
  filter(lang(?de) = "de")
  filter(regex(?de, "^Stolperstein für (\\p{L}+) \\p{L}\\. (\\p{L}+)$"))
  bind(replace(?de, "^Stolperstein für (\\p{L}+) \\p{L}\\. (\\p{L}+)$", "$1 $2") as ?name)
  bind(concat("Stolperstein für ", ?name) as ?Ade)
  filter not exists {
    ?stolperstein skos:altLabel ?alias.
    filter(?alias = strlang(?Ade, "de"))
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?Ade"):::projected v1("?alias") v4("?de") v5("?name") v6("?qid") v3("?stolperstein"):::projected c5(["wd:Q26703203"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?alias = STRLANG(?Ade,'de')"]] e0f0 --> e0v1 e0f0 --> e0v2 e0v3 --"skos:altLabel"--> e0v1 e0v2("?Ade"):::projected e0v1("?alias"):::projected e0v3("?stolperstein"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v6 f0 --> v3 f0 --> c2 f1[["?alias = STRLANG(?Ade,'de')"]] f1 --> v1 f1 --> v6 v3 --"skos:altLabel"--> v1 f2[["regex(?de,'^Stolperstein für (\p{L}+) \p{L}\. (\p{L}+)$')"]] f2 --> v4 f3[["?de = 'de'"]] f3 --> v4 v3 --"wdt:P31"--> c5 v3 --"rdfs:label"--> v4 bind4[/"replace(?de,'^Stolperstein für (\p{L}+) \p{L}\. (\p{L}+)$','$1 $2')"/] v4 --o bind4 bind4 --as--o v5 bind5[/"concat('Stolperstein für ',?name)"/] v5 --o bind5 bind5 --as--o v6 bind6[/"replace(str(?stolperstein),str('wd:'),'')"/] v3 --o bind6 bind6 --as--o v6