query-cb8e26d97538f0b6941ce13c05f4167f

rq turtle/ttl

Most attested lexemes

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 target: <http://www.wikidata.org/entity/Q9035> 

SELECT 
  ?number_of_attestors

  ?lexeme ?lexemeLabel
  (CONCAT("#lexeme/", SUBSTR(STR(?lexeme), 32)) AS ?lexemeUrl)

  ?example_attestor ?example_attestorLabel
  (CONCAT("#lexemeattestor/", SUBSTR(STR(?example_attestor), 32)) AS ?example_attestorUrl)

WHERE{
   {
  SELECT 
    (COUNT(?attestor) AS ?number_of_attestors)
    ?lexeme
    (SAMPLE(?attestor) AS ?example_attestor)
  WHERE {
    ?lexeme wdt:P5323 ?attestor ;
            dct:language target: .
  }
  GROUP BY ?lexeme
}  ?lexeme wikibase:lemma ?lexemeLabel .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?number_of_attestors)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?attestor") v4("?example_attestor"):::projected v7("?example_attestorUrl") v2("?lexeme"):::projected v5("?lexemeLabel"):::projected v6("?lexemeUrl") v4("?number_of_attestors"):::projected c3([http://www.wikidata.org/entity/Q9035]):::iri c6(["bd:serviceParam"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P5323"--> v3 v2 --"dct:language"--> c3 bind2[/"count(?attestor)"/] v3 --o bind2 bind2 --as--o v4 bind3[/"sample(?attestor)"/] v3 --o bind3 bind3 --as--o v4 v2 --"wikibase:lemma"--> v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end bind4[/"concat('#lexeme/',substring(str(?lexeme),'32^^xsd:integer'))"/] v2 --o bind4 bind4 --as--o v6 bind5[/"concat('#lexemeattestor/',substring(str(?example_attestor),'32^^xsd:integer'))"/] v4 --o bind5 bind5 --as--o v7