query-dc4c4348e49478090438412e47f63f7c

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 ?(Prof\.( ?Dr\.)?|Dr\.( ?med\.( ?vet\.)?| ?[ji]ur\.| ?phil\.)?)")) bind(replace(?de, "^Stolperstein für ?(Prof\.( ?Dr\.)?|Dr\.( ?med\.( ?vet\.)?| ?[ji]ur\.| ?phil\.)?) ", "") 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 ?(Prof\\.( ?Dr\\.)?|Dr\\.( ?med\\.( ?vet\\.)?| ?[ji]ur\\.| ?phil\\.)?)"))
  bind(replace(?de, "^Stolperstein für ?(Prof\\.( ?Dr\\.)?|Dr\\.( ?med\\.( ?vet\\.)?| ?[ji]ur\\.| ?phil\\.)?) ", "") 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 ?(Prof\.( ?Dr\.)?|Dr\.( ?med\.( ?vet\.)?| ?#91;ji#93;ur\.| ?phil\.)?)')"]] f2 --> v4 f3[["?de = 'de'"]] f3 --> v4 v3 --"wdt:P31"--> c5 v3 --"rdfs:label"--> v4 bind4[/"replace(?de,'^Stolperstein für ?(Prof\.( ?Dr\.)?|Dr\.( ?med\.( ?vet\.)?| ?#91;ji#93;ur\.| ?phil\.)?) ','')"/] 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