query-1a94cd64bc4c06e5b369e5b2f3e6a0e9

rq turtle/ttl

Lexeme descriptors

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target1: <http://www.wikidata.org/entity/Q24905>
PREFIX target2: <http://www.wikidata.org/entity/Q9035>

# List lexemes wrt. a lexical category and language
SELECT
  ?number_of_lexemes

  ?descriptor ?descriptorLabel
  (CONCAT("#lexemedescriptor/", SUBSTR(STR(?descriptor), 32)) AS ?descriptorUrl)
  ?descriptorDescription
WHERE {
   {      
  SELECT 
    ?descriptor
    (COUNT(?lexeme) AS ?number_of_lexemes)
  WHERE {
    ?lexeme wikibase:lexicalCategory target1: ;
            dct:language target2: ;
            wdt:P1343 ?descriptor .
  }
  GROUP BY ?descriptor
}  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?number_of_lexemes)
LIMIT 10000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?descriptor"):::projected v4("?descriptorUrl") v2("?lexeme") v4("?number_of_lexemes"):::projected c4([http://www.wikidata.org/entity/Q9035]):::iri c7(["bd:serviceParam"]):::iri c2([http://www.wikidata.org/entity/Q24905]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wikibase:lexicalCategory"--> c2 v2 --"dct:language"--> c4 v2 --"wdt:P1343"--> v3 bind1[/"count(?lexeme)"/] v2 --o bind1 bind1 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind2[/"concat('#lexemedescriptor/',substring(str(?descriptor),'32^^xsd:integer'))"/] v3 --o bind2 bind2 --as--o v4