query-70b5ea232656b05d1cdf31ba1fb6c8ad
Languages
Use at
- https://query.wikidata.org/sparql
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
?usage_examples
(CONCAT("#language/", SUBSTR(STR(?language), 32), "/lexemeusageexample") AS ?usage_examplesUrl)
?language ?languageLabel
(CONCAT("#language/", SUBSTR(STR(?language), 32)) AS ?languageUrl)
?example_usage_example
(CONCAT(?example_usage_example, " (Ordia ↗)") AS ?example_usage_exampleLabel)
(CONCAT("https://ordia.toolforge.org/text-to-lexemes?text=", ENCODE_FOR_URI(?example_usage_example), "&text-language=", LANG(?example_usage_example)) AS ?example_usage_exampleUrl)
WHERE {
{
SELECT
(COUNT(?usage_example) AS ?usage_examples)
?language
(SAMPLE(?usage_example) AS ?example_usage_example)
WHERE {
[] dct:language ?language ;
wdt:P5831 ?usage_example .
}
GROUP BY ?language
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
ORDER BY DESC(?usage_examples)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?example_usage_example"):::projected
v7("?example_usage_exampleLabel")
v8("?example_usage_exampleUrl")
v2("?language"):::projected
v6("?languageUrl")
v3("?usage_example")
v4("?usage_examples"):::projected
v5("?usage_examplesUrl")
a1((" "))
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
a1 --"dct:language"--> v2
a1 --"wdt:P5831"--> v3
bind2[/"count(?usage_example)"/]
v3 --o bind2
bind2 --as--o v4
bind3[/"sample(?usage_example)"/]
v3 --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('#language/',substring(str(?language),'32^^xsd:integer'),'/lexemeusageexample')"/]
v2 --o bind4
bind4 --as--o v5
bind5[/"concat('#language/',substring(str(?language),'32^^xsd:integer'))"/]
v2 --o bind5
bind5 --as--o v6
bind6[/"concat(?example_usage_example,' (Ordia ↗)')"/]
v4 --o bind6
bind6 --as--o v7
bind7[/"concat('https://ordia.toolforge.org/text-to-lexemes?text=',encode-for-uri(?example_usage_example),'&text-language=',?example_usage_example)"/]
v4 --o bind7
bind7 --as--o v8