query-5d22a2cb5770ebacfb8ed55e2dd66e56

rq turtle/ttl

Lexeme attestors

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#>
SELECT 
  ?lexemes

  ?attestor ?attestorLabel
  (CONCAT("#lexemeattestor/", SUBSTR(STR(?attestor), 32)) AS ?attestorUrl)
  ?attestorDescription

  ?example_lexeme
  (SUBSTR(STR(?example_lexeme), 32) AS ?example_lexemeLabel)
  (CONCAT("#lexeme/", SUBSTR(STR(?example_lexeme), 32)) AS ?example_lexemeUrl)
WHERE{
   {
  SELECT 
    (COUNT(?lexeme) AS ?lexemes)
    ?attestor
    (SAMPLE(?lexeme) AS ?example_lexeme)
  WHERE {
    ?lexeme wdt:P5323 ?attestor ;
            dct:language [] .
  }
  GROUP BY ?attestor
}  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?lexemes)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?attestor"):::projected v5("?attestorUrl") v4("?example_lexeme"):::projected v6("?example_lexemeLabel") v7("?example_lexemeUrl") v2("?lexeme") v4("?lexemes"):::projected a1((" ")) c4(["bd:serviceParam"]):::iri c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P5323"--> v3 v2 --"dct:language"--> a1 bind2[/"count(?lexeme)"/] v2 --o bind2 bind2 --as--o v4 bind3[/"sample(?lexeme)"/] v2 --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('#lexemeattestor/',substring(str(?attestor),'32^^xsd:integer'))"/] v3 --o bind4 bind4 --as--o v5 bind5[/"substring(str(?example_lexeme),'32^^xsd:integer')"/] v4 --o bind5 bind5 --as--o v6 bind6[/"concat('#lexeme/',substring(str(?example_lexeme),'32^^xsd:integer'))"/] v4 --o bind6 bind6 --as--o v7