query-f78d60eae4d2821cdfecbebe3ec64351
Synia: language
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX target: <http://www.wikidata.org/entity/Q9035>
SELECT
?description
?value ?valueUrl
?wikidata ?wikidataUrl
?hangor ?hangorUrl
?ordia ?ordiaUrl
?scholia ?scholiaUrl
WHERE {
{
BIND(1 AS ?order)
BIND("Language" AS ?description)
target: rdfs:label ?value_string .
FILTER (LANG(?value_string) = 'en')
BIND(COALESCE(?value_string, SUBSTR(STR(target:), 32)) AS ?value)
BIND(CONCAT(SUBSTR(STR(target:), 32), " ↗") AS ?wikidata)
BIND(CONCAT("https://www.wikidata.org/wiki/", SUBSTR(STR(target:), 32)) AS ?wikidataUrl)
BIND("Hangor ↗" AS ?hangor)
BIND(CONCAT("https://hangor.toolforge.org/browse/", SUBSTR(STR(target:), 32)) AS ?hangorUrl)
BIND("Ordia ↗" AS ?ordia)
BIND(CONCAT("https://ordia.toolforge.org/language/", SUBSTR(STR(target:), 32)) AS ?ordiaUrl)
BIND("Scholia ↗" AS ?scholia)
BIND(CONCAT("https://scholia.toolforge.org/language/", SUBSTR(STR(target:), 32)) AS ?scholiaUrl)
}
UNION
{
SELECT
(2 AS ?order)
("Number of lexemes" AS ?description)
(COUNT(*) AS ?value)
{
[] dct:language target: .
BIND(1 AS ?dummy)
}
GROUP BY ?dummy
}
UNION
{
SELECT
(3 AS ?order)
("Number of senses" AS ?description)
(COUNT(*) AS ?value)
(CONCAT("#language/", SUBSTR(STR(target:), 32), "/sense") AS ?valueUrl)
WHERE {
[] ^ontolex:sense / dct:language target: .
BIND(1 AS ?dummy)
}
GROUP BY ?dummy
}
UNION
{
SELECT
(4 AS ?order)
("Number of forms" AS ?description)
(COUNT(*) AS ?value)
{
[] ^ontolex:lexicalForm / dct:language target: .
BIND(1 AS ?dummy)
}
GROUP BY ?dummy
}
UNION
{
BIND(10 AS ?order)
BIND("Number of speakers" AS ?description)
target: wdt:P1098 ?value .
}
}
ORDER BY ?order
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v15("?description"):::projected
v15("?dummy")
v7("?hangor"):::projected
v8("?hangorUrl"):::projected
v15("?order")
v9("?ordia"):::projected
v10("?ordiaUrl"):::projected
v11("?scholia"):::projected
v12("?scholiaUrl"):::projected
v15("?value"):::projected
v14("?valueUrl"):::projected
v2("?value_string")
v5("?wikidata"):::projected
v6("?wikidataUrl"):::projected
a1((" "))
a3((" "))
a5((" "))
a2((" "))
a4((" "))
c2([http://www.wikidata.org/entity/Q9035]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
bind0[/"'10^^xsd:integer'"/]
bind0 --as--o v15
bind1[/"'Number of speakers'"/]
bind1 --as--o v15
c2 --"wdt:P1098"--> v15
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
a4 --"ontolex:lexicalForm"--> a5
a4 --"dct:language"--> c2
bind2[/"'1^^xsd:integer'"/]
bind2 --as--o v15
bind4[/"'4^^xsd:integer'"/]
bind4 --as--o v15
bind5[/"'Number of forms'"/]
bind5 --as--o v15
bind6[/"count(*)"/]
bind6 --as--o v15
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
a2 --"ontolex:sense"--> a3
a2 --"dct:language"--> c2
bind7[/"'1^^xsd:integer'"/]
bind7 --as--o v15
bind9[/"'3^^xsd:integer'"/]
bind9 --as--o v15
bind10[/"'Number of senses'"/]
bind10 --as--o v15
bind11[/"count(*)"/]
bind11 --as--o v15
bind12[/"concat('#language/',substring(str(http://www.wikidata.org/entity/Q9035),'32^^xsd:integer'),'/sense')"/]
bind12 --as--o v14
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
a1 --"dct:language"--> c2
bind13[/"'1^^xsd:integer'"/]
bind13 --as--o v15
bind15[/"'2^^xsd:integer'"/]
bind15 --as--o v15
bind16[/"'Number of lexemes'"/]
bind16 --as--o v15
bind17[/"count(*)"/]
bind17 --as--o v15
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f18[["?value_string = 'en'"]]
f18 --> v2
bind19[/"'1^^xsd:integer'"/]
bind19 --as--o v15
bind20[/"'Language'"/]
bind20 --as--o v15
c2 --"rdfs:label"--> v2
bind21[/"?value_stringsubstring(str(http://www.wikidata.org/entity/Q9035),'32^^xsd:integer')"/]
v2 --o bind21
bind21 --as--o v15
bind22[/"concat(substring(str(http://www.wikidata.org/entity/Q9035),'32^^xsd:integer'),' ↗')"/]
bind22 --as--o v5
bind23[/"concat('https://www.wikidata.org/wiki/',substring(str(http://www.wikidata.org/entity/Q9035),'32^^xsd:integer'))"/]
bind23 --as--o v6
bind24[/"'Hangor ↗'"/]
bind24 --as--o v7
bind25[/"concat('https://hangor.toolforge.org/browse/',substring(str(http://www.wikidata.org/entity/Q9035),'32^^xsd:integer'))"/]
bind25 --as--o v8
bind26[/"'Ordia ↗'"/]
bind26 --as--o v9
bind27[/"concat('https://ordia.toolforge.org/language/',substring(str(http://www.wikidata.org/entity/Q9035),'32^^xsd:integer'))"/]
bind27 --as--o v10
bind28[/"'Scholia ↗'"/]
bind28 --as--o v11
bind29[/"concat('https://scholia.toolforge.org/language/',substring(str(http://www.wikidata.org/entity/Q9035),'32^^xsd:integer'))"/]
bind29 --as--o v12
end
union0r <== or ==> union0l
end