query-55f33ecf4e4151c239a051879a14518a

rq turtle/ttl

Usage examples

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX target: <http://www.wikidata.org/entity/Q9035> 

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

  ?usage_example
  (CONCAT(?usage_example, " (Ordia ↗)") AS ?usage_exampleLabel)
  (CONCAT("https://ordia.toolforge.org/text-to-lexemes?text=", ENCODE_FOR_URI(?usage_example), "&text-language=", LANG(?usage_example)) AS ?usage_exampleUrl)
WHERE {
   {
  SELECT 
    ?lexeme 
    (GROUP_CONCAT(?lemma; separator=" / ") AS ?lexemeLabel)
    ?usage_example
  WHERE {
    ?lexeme dct:language target: ;  
            wikibase:lemma ?lemma ;
            wdt:P5831 ?usage_example .
  }
  GROUP BY ?lexeme ?usage_example
} 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?lemma") v1("?lexeme"):::projected v4("?lexemeLabel"):::projected v5("?lexemeUrl") v3("?usage_example"):::projected v6("?usage_exampleLabel") v7("?usage_exampleUrl") c2([http://www.wikidata.org/entity/Q9035]):::iri v1 --"dct:language"--> c2 v1 --"wikibase:lemma"--> v2 v1 --"wdt:P5831"--> v3 bind1[/"?lemma"/] v2 --o bind1 bind1 --as--o v4 bind2[/"concat('#lexeme/',substring(str(?lexeme),'32^^xsd:integer'))"/] v1 --o bind2 bind2 --as--o v5 bind3[/"concat(?usage_example,' (Ordia ↗)')"/] v3 --o bind3 bind3 --as--o v6 bind4[/"concat('https://ordia.toolforge.org/text-to-lexemes?text=',encode-for-uri(?usage_example),'&text-language=',?usage_example)"/] v3 --o bind4 bind4 --as--o v7