query-ea5d147aa61d6754a0e34228ed762e0d
Get all latin alphabet interwikis of an item 09:42, 11 November 2020 (UTC) 💛●✒️●💬 Bouzinac, being an latin-alphabet language (eg. frwiki, enwiki, dewiki, vietnamese, etc). And then get a stats on the first letter (eg how much first B and how much first P). Thanks ! (Q16520)Busan Hello, how to get all wikititles of that item However, we don't really need it - because if the page title starts with a Latin character, we can assume it's in Latin script :-). So this query finds all the sitelinks, filters to just Wikipedias, and then checks if they start with "B" or "P": have several different alphabets set.(Q9292)Azerbaijani on the language, some like (P282)writing system on the Wikipedia, not all of them have it set; if we do it by (P282)writing system : So this one is a little tricky because it's hard to pick out a "Latin-alphabet language" through SPARQL. If we do it by Bouzinac@
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?article ?letter ?name ?lang WHERE
{
?article schema:about wd:Q16520 . ?article schema:name ?name . ?article schema:inLanguage ?lang . ?article schema:isPartOf ?x .
FILTER CONTAINS(str(?x), "wikipedia") . # only Wikipedias
optional { filter(STRSTARTS(?name, 'B')) . bind('B' as ?letter) } # title starts with B
optional { filter(STRSTARTS(?name, 'P')) . bind('P' as ?letter) } # title starts with P
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by ?letter ?name