Hi,
I am looking for the most efficient way of getting the following information out of WDQS:
Let's say we have a list of all sovereign states (Q16, Q30, Q142,
...) and all letters of the requested language (French: a, b, c,
...) , we can automate requests and get a lot of results.
Unfortunately, it's costly and not efficient. It takes about a day
to succeed.
SELECT ?person ?personLabel ?countryLabel ?givenNameLabel
?familyNameLabel ?article ?persondesc
WHERE
{
?person wdt:P31 wd:Q5;
wdt:P27 wd:Q30;
wdt:P27 ?country;
wdt:P734 ?familyName;
wdt:P735 ?givenName ;
rdfs:label ?personLabel.
?familyName rdfs:label ?familyNameLabel.
?country rdfs:label ?countryLabel.
?givenName rdfs:label ?givenNameLabel.
?person schema:description ?persondesc.
FILTER(LANG(?personLabel) = "fr").
FILTER(LANG(?familyNameLabel) = "en").
FILTER(LANG(?countryLabel) = "fr").
FILTER(LANG(?givenNameLabel) = "en").
FILTER(LANG(?persondesc) = "fr").
FILTER(STRSTARTS(?personLabel, "D")).
FILTER(STRSTARTS(?familyNameLabel, "E")).
?article schema:about ?person;
schema:inLanguage "fr";
schema:isPartOf
<https://fr.wikipedia.org/> .
}
Such a request takes an average of 20 seconds to complete.
Any help will be much appreciated. Thanks for your time.
Justin