query-163395043b7c4ff447b16dfb25b3035c

rq turtle/ttl

TODO Поиск по строке

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
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#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel 
WHERE {

  VALUES ?name {"Wolfgang Amadeus Mozart" "George Frideric Handel"} 
  BIND(?name as ?name2)
  SERVICE wikibase:mwapi {
    bd:serviceParam wikibase:api "Search";
                    wikibase:endpoint "www.wikidata.org";
                    mwapi:srsearch ?name.
    ?item wikibase:apiOutputItem mwapi:title .
  }
  ?item wdt:P31 wd:Q5.
  ?item rdfs:label ?label.
  FILTER regex(str(?label), ?name2) 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?item"):::projected v1("?label") v3("?name") v4("?name2") c6(["www.wikidata.org"]):::literal c15(["#91;AUTO_LANGUAGE#93;,de"]):::literal c2(["bd:serviceParam"]):::iri c4(["Search"]):::literal c11(["wd:Q5"]):::iri c9(["mwapi:title"]):::iri f0[["regex(str(?label),?name2)"]] f0 --> v1 f0 --> v4 bind1[/VALUES ?name/] bind1-->v3 bind10(["Wolfgang Amadeus Mozart"]) bind10 --> bind1 bind11(["George Frideric Handel"]) bind11 --> bind1 bind2[/"?name"/] v3 --o bind2 bind2 --as--o v4 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c2 --"mwapi:api"--> c4 c2 --"mwapi:endpoint"--> c6 c2 --"mwapi:srsearch"--> v3 v4 --"mwapi:apiOutputItem"--> c9 end v4 --"wdt:P31"--> c11 v4 --"rdfs:label"--> v1 subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c2 --"mwapi:language"--> c15 end