query-dcb22df5055fd9fe1eb4aa16f48e825b
List with counts of lexical categories SELECT ?count ?lexical_category ?lexical_categoryLabel (CONCAT("#lexicalcategory/", SUBSTR(STR(?lexical_category), 32)) AS ?lexical_categoryUrl) WITH { SELECT (COUNT(*) AS ?count) ?lexical_category WHERE { [] wikibase:lexicalCategory ?lexical_category . } GROUP BY ?lexical_category } AS %results WHERE { INCLUDE %results SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY DESC(?count)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# List with counts of lexical categories
SELECT
?count
?lexical_category ?lexical_categoryLabel
(CONCAT("#lexicalcategory/", SUBSTR(STR(?lexical_category), 32)) AS ?lexical_categoryUrl)
WHERE {
{
SELECT (COUNT(*) AS ?count) ?lexical_category WHERE {
[] wikibase:lexicalCategory ?lexical_category .
}
GROUP BY ?lexical_category
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?count"):::projected
v2("?lexical_category"):::projected
v3("?lexical_categoryUrl")
a1((" "))
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
a1 --"wikibase:lexicalCategory"--> v2
bind1[/"count(*)"/]
bind1 --as--o v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
bind2[/"concat('#lexicalcategory/',substring(str(?lexical_category),'32^^xsd:integer'))"/]
v2 --o bind2
bind2 --as--o v3