query-2eb6542c78834daa327b1bcd0c1c149b
Senses per language
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
?senses
(CONCAT("#language/", SUBSTR(STR(?language), 32), "/lexemesense") AS ?sensesUrl)
?language ?languageLabel
(CONCAT("#language/", SUBSTR(STR(?language), 32)) AS ?languageUrl)
?languageDescription
?example_sense
WHERE {
{
SELECT
(COUNT(?sense) AS ?senses)
?language
(SAMPLE(?sense) AS ?example_sense)
WHERE {
[] dct:language ?language ;
ontolex:sense ?sense .
}
GROUP BY ?language
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?senses)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?example_sense"):::projected
v2("?language"):::projected
v6("?languageUrl")
v3("?sense")
v4("?senses"):::projected
v5("?sensesUrl")
a1((" "))
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
a1 --"dct:language"--> v2
a1 --"ontolex:sense"--> v3
bind2[/"count(?sense)"/]
v3 --o bind2
bind2 --as--o v4
bind3[/"sample(?sense)"/]
v3 --o bind3
bind3 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end
bind4[/"concat('#language/',substring(str(?language),'32^^xsd:integer'),'/lexemesense')"/]
v2 --o bind4
bind4 --as--o v5
bind5[/"concat('#language/',substring(str(?language),'32^^xsd:integer'))"/]
v2 --o bind5
bind5 --as--o v6