query-d881058ad4324fd41749d1553233f962
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#>
SELECT
?lexemes
?language_styles
(CONCAT("#language/", SUBSTR(STR(?language), 32), "/languagestyle") AS ?language_stylesUrl)
?language ?languageLabel
(CONCAT("#language/", SUBSTR(STR(?language), 32)) AS ?languageUrl)
?example_language_style ?example_language_styleLabel
(CONCAT("#languagestyle/", SUBSTR(STR(?example_language_style), 32)) AS ?example_language_styleUrl)
WHERE {
{
SELECT
(COUNT(DISTINCT ?lexeme) AS ?lexemes)
(COUNT(DISTINCT ?language_style) AS ?language_styles)
?language
(SAMPLE(?language_style) AS ?example_language_style)
WHERE {
?lexeme dct:language ?language ;
ontolex:sense / wdt:P6191 ?language_style .
}
GROUP BY ?language
} 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;
v6("?example_language_style"):::projected
v9("?example_language_styleUrl")
v3("?language"):::projected
v8("?languageUrl")
v4("?language_style")
v5("?language_styles"):::projected
v7("?language_stylesUrl")
v2("?lexeme")
v5("?lexemes"):::projected
a1((" "))
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"dct:language"--> v3
v2 --"ontolex:sense"--> a1
a1 --"wdt:P6191"--> v4
bind3[/"count(?lexeme)"/]
v2 --o bind3
bind3 --as--o v5
bind4[/"count(?language_style)"/]
v4 --o bind4
bind4 --as--o v5
bind5[/"sample(?language_style)"/]
v4 --o bind5
bind5 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
bind6[/"concat('#language/',substring(str(?language),'32^^xsd:integer'),'/languagestyle')"/]
v3 --o bind6
bind6 --as--o v7
bind7[/"concat('#language/',substring(str(?language),'32^^xsd:integer'))"/]
v3 --o bind7
bind7 --as--o v8
bind8[/"concat('#languagestyle/',substring(str(?example_language_style),'32^^xsd:integer'))"/]
v6 --o bind8
bind8 --as--o v9