Hello all, Finally I think I solved it.
A query with 11 results at the time of writing http://tinyurl.com/hofewk3 Entries with 'de' lang in label: Uncomment: #FILTER EXISTS { # ?h rdfs:label ?label . # FILTER ( langMatches(lang(?label), 'de' ) ) #} Entries missing 'de' lang in label: Uncomment: #FILTER NOT EXISTS { # ?h rdfs:label ?label . # FILTER ( langMatches(lang(?label), 'de' ) ) #} Thanks for all! El 29/04/16 a les 13:07, Toni Hermoso Pulido ha escrit: > Hi Jerven, > > I tried with: > > SELECT distinct ?h ?label ?ll > WHERE > { > ?h wdt:P31 wd:Q5 . > ?h wdt:P569 ?date . > ?h wdt:P19 ?birthplace . > ?birthplace wdt:P31*/wdt:P131* wd:Q5720 . > ?h rdfs:label ?label . > FILTER (NOT EXISTS { > BIND (lang(?label) as ?ll) > FILTER ( ?ll = "ca" ) . > }) > } > ORDER BY ?label LIMIT 100 > > and I would expect that one of the results: > > h > > label > > ll > wd:Q377947 <http://www.wikidata.org/entity/Q377947> Adrián Palomares > wd:Q5660653 <http://www.wikidata.org/entity/Q5660653> Agustín Galiana > > wd:Q5662450 <http://www.wikidata.org/entity/Q5662450> Alba Rico > wd:Q5663315 <http://www.wikidata.org/entity/Q5663315> Alberto Mira > wd:Q3753762 <http://www.wikidata.org/entity/Q3753762> Alberto > Miralles > wd:Q451736 <http://www.wikidata.org/entity/Q451736> Amadeo Gabino > wd:Q3779647 <http://www.wikidata.org/entity/Q3779647> Ambrós > wd:Q5673275 <http://www.wikidata.org/entity/Q5673275> Amparo Valle > wd:Q3326138 <http://www.wikidata.org/entity/Q3326138> Ana Duato > wd:Q2844983 <http://www.wikidata.org/entity/Q2844983> Ana Juan > wd:Q5673898 <http://www.wikidata.org/entity/Q5673898> Ana María Drack > > > > https://www.wikidata.org/wiki/Q5673275 > would not have a 'ca' label... > but it seems to have. > > > El 04/29/2016 a les 11:19 AM, Jerven Tjalling Bolleman ha escrit: >> This seems to work. >> >> SELECT distinct ?h ?label ?ll >> WHERE >> { >> ?h wdt:P31 wd:Q5 . >> ?h wdt:P569 ?date . >> ?h wdt:P19 ?birthplace . >> ?birthplace wdt:P31*/wdt:P131* wd:Q5720 . >> ?h rdfs:label ?label . >> FILTER (NOT EXISTS { >> BIND (lang(?label) as ?ll) >> FILTER ( ?ll = "de" ) . >> }) >> } >> ORDER BY ?label LIMIT 100 >> >> On 29/04/16 09:24, Toni Hermoso Pulido wrote: >>> Hello, >>> >>> I'm trying to retrieve via SPARQL those entries missing a label in a >>> certain language (e.g. "de"). >>> Example from this query: http://tinyurl.com/zazewyx >>> >>> How this could be done straight from a SPARQL query? >>> -- Toni Hermoso Pulido http://www.cau.cat http://www.similis.cc _______________________________________________ Wikidata mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata
