query-54c0def2eeaa9f739ceb219288205d4b
Senses per lexical category
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
?senses
(CONCAT("#lexicalcategory/", SUBSTR(STR(?lexical_category), 32)) AS ?sensesUrl)
?lexical_category ?lexical_categoryLabel
(CONCAT("#lexicalcategory/", SUBSTR(STR(?lexical_category), 32)) AS ?lexical_categoryUrl)
?lexical_categoryDescription
WHERE {
{
SELECT
(COUNT(?sense) AS ?senses)
?lexical_category
WHERE {
[] ontolex:sense ?sense ;
wikibase:lexicalCategory ?lexical_category .
}
GROUP BY ?lexical_category
} 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;
v3("?lexical_category"):::projected
v5("?lexical_categoryUrl")
v2("?sense")
v4("?senses"):::projected
v4("?sensesUrl")
a1((" "))
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
a1 --"ontolex:sense"--> v2
a1 --"wikibase:lexicalCategory"--> v3
bind1[/"count(?sense)"/]
v2 --o bind1
bind1 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end
bind2[/"concat('#lexicalcategory/',substring(str(?lexical_category),'32^^xsd:integer'))"/]
v3 --o bind2
bind2 --as--o v4
bind3[/"concat('#lexicalcategory/',substring(str(?lexical_category),'32^^xsd:integer'))"/]
v3 --o bind3
bind3 --as--o v5