query-755115486c90d83f9546acbfc104ac0c
100 most translated concepts using lexemesHi :) , resulting in this: this queryI just learned some more SPARQL and came up with 17:42, 21 November 2019 (UTC)) talk (So9qNow I want to come up with a query that shows me a list of all of these missing a lexeme in Danish (so I can work on them). Can someone help with that?--I've managed to get a list of meanings where specific (here:Russian) language is presented:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?meaning ?meaningLabel ?count WHERE
{
?l a ontolex:LexicalEntry ;
dct:language ?language ;
ontolex:sense ?sense. # get the sense
?sense wdt:P5137 ?meaning. #extract the meaning
FILTER (?language = wd:Q7737)
{
SELECT ?meaning (count(?l) as ?count)
WHERE {
?l a ontolex:LexicalEntry ;
ontolex:sense ?sense. # get the sense
?sense wdt:P5137 ?meaning. #extract the meaning
}
group by ?meaning # this is to avoid "bad aggregate", see https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial#Painting_materials
order by desc(?count) # rank by the most translated concepts
limit 100 # only show the 100 highest to avoid clutter
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?count"):::projected
v2("?l")
v1("?language")
v4("?meaning"):::projected
v3("?sense")
c8(["bd:serviceParam"]):::iri
c3(["ontolex:LexicalEntry"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?language = 'wd:Q7737'"]]
f0 --> v1
v2 --"a"--> c3
v2 --"dct:language"--> v1
v2 --"ontolex:sense"--> v3
v3 --"wdt:P5137"--> v4
v2 --"a"--> c3
v2 --"ontolex:sense"--> v3
v3 --"wdt:P5137"--> v4
bind2[/"count(?l)"/]
v2 --o bind2
bind2 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end