query-fbe6d3570ba006f21d74be829f8e753d

rq turtle/ttl

&& which gives me a list of names similar to the given name "Franz". I could work with this for the price of having to query each given name separately., e.g. accessing only items with label="Franz" or getting all in one query? 20:58, 14 April 2024 (UTC)) talk (Herzi PinkiIs there any smarter solution? best --19:42, 16 April 2024 (UTC)) talk (Vincent TepWhat I cannot explain though is that this only works if the label service line is wrapped in an OPTIONAL clause, otherwise this approach fails too. . This query returns 48,861 hits in about 40 seconds.like thisYour first query doesn't time out if you turn off the label service. In order to get the labels, you can wrap your query in a WITH clause, and then use the label service in the main part of your query, ,Herzi PinkiHello @12:01, 17 April 2024 (UTC)) talk (Vincent Tepyour initial query works fine when you disable the label service. Maybe you can do this (retrieve only item IDs), and then make a separate call/query to get their labels? 09:51, 17 April 2024 (UTC)) talk (Herzi PinkiI want to embed the query in a script to check gender against names, so a static .csv will not really help. best -- 06:41, 17 April 2024 (UTC)) talk (Vincent TepI tried it multiple times and it timed out once too. I suggest you try again. If it doesn't work I can send you a .csv of the results. 22:36, 16 April 2024 (UTC)) talk (Herzi Pinki: a lot of not straightforward tricks. and it still times out for me. :-( thanks anyhow --Vincent Tep@splendid idea:

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
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 ?item ?itemLabel
WHERE {
  ?item rdfs:label ?itemLabel .
   FILTER (LANG(?itemLabel) = "de"). 
VALUES ?item {

wd:Q741
wd:Q923
wd:Q1557
wd:Q4642
wd:Q20164
wd:Q20790
wd:Q24223
wd:Q29884
wd:Q37080
wd:Q42771
}.
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'de' }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v1("?itemLabel"):::projected c1(["de"]):::literal c4(["bd:serviceParam"]):::iri f0[["?itemLabel = 'de'"]] f0 --> v1 v3 --"rdfs:label"--> v1 bind1[/VALUES ?item/] bind1-->v3 bind10(["wd:Q741"]) bind10 --> bind1 bind11(["wd:Q923"]) bind11 --> bind1 bind12(["wd:Q1557"]) bind12 --> bind1 bind13(["wd:Q4642"]) bind13 --> bind1 bind14(["wd:Q20164"]) bind14 --> bind1 bind15(["wd:Q20790"]) bind15 --> bind1 bind16(["wd:Q24223"]) bind16 --> bind1 bind17(["wd:Q29884"]) bind17 --> bind1 bind18(["wd:Q37080"]) bind18 --> bind1 bind19(["wd:Q42771"]) bind19 --> bind1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c1 end