query-a59472b963a7ab67b96dee27803a87f2
Languages
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target: <http://www.wikidata.org/entity/Q8102>
SELECT
?lexemes
?language ?languageLabel
(CONCAT("#language/", SUBSTR(STR(?language), 32)) AS ?languageUrl)
?languageDescription
?example_lexeme ?example_lexemeLabel
(CONCAT("#lexeme/", SUBSTR(STR(?example_lexeme), 32)) AS ?example_lexemeUrl)
WHERE {
{
SELECT
(COUNT(DISTINCT ?lexeme) AS ?lexemes)
?language
(SAMPLE(?lexeme) AS ?example_lexeme)
WHERE {
?lexeme dct:language ?language ;
ontolex:sense / wdt:P6191 target: .
}
GROUP BY ?language
} ?example_lexeme wikibase:lemma ?example_lexemeLabel
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;
v4("?example_lexeme"):::projected
v5("?example_lexemeLabel"):::projected
v7("?example_lexemeUrl")
v3("?language"):::projected
v6("?languageUrl")
v2("?lexeme")
v4("?lexemes"):::projected
a1((" "))
c4([http://www.wikidata.org/entity/Q8102]):::iri
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"dct:language"--> v3
v2 --"ontolex:sense"--> a1
a1 --"wdt:P6191"--> c4
bind2[/"count(?lexeme)"/]
v2 --o bind2
bind2 --as--o v4
bind3[/"sample(?lexeme)"/]
v2 --o bind3
bind3 --as--o v4
v4 --"wikibase:lemma"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind4[/"concat('#language/',substring(str(?language),'32^^xsd:integer'))"/]
v3 --o bind4
bind4 --as--o v6
bind5[/"concat('#lexeme/',substring(str(?example_lexeme),'32^^xsd:integer'))"/]
v4 --o bind5
bind5 --as--o v7