query-2611f8620e1a09af91a81777d55ac74f
title:日本語の語彙素数、語義数、語形数、話者数(ordiaより) SELECT ?description ?value ?valueUrl WHERE { BIND(wd:Q5287 AS ?language) { BIND(1 AS ?order) BIND("言語" AS ?description) ?language rdfs:label ?value_string . FILTER (LANG(?value_string) = 'ja') BIND(COALESCE(?value_string, ?q) AS ?value) } UNION { SELECT (2 AS ?order) ("語彙素数" AS ?description) (COUNT() AS ?value) { [] dct:language wd:Q5287 . BIND(1 AS ?dummy) } GROUP BY ?dummy } UNION { SELECT (3 AS ?order) ("語義数" AS ?description) (COUNT() AS ?value) { [] ^ontolex:sense / dct:language wd:Q5287 . BIND(1 AS ?dummy) } GROUP BY ?dummy } UNION { SELECT (4 AS ?order) ("語形数" AS ?description) (COUNT(*) AS ?value) { [] ^ontolex:lexicalForm / dct:language wd:Q5287 . BIND(1 AS ?dummy) } GROUP BY ?dummy } UNION { BIND(10 AS ?order) BIND("話者数" AS ?description) ?language wdt:P1098 ?value . } } ORDER BY ?order
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
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/>
#title:日本語の語彙素数、語義数、語形数、話者数(ordiaより)
SELECT ?description ?value ?valueUrl
WHERE {
BIND(wd:Q5287 AS ?language)
{
BIND(1 AS ?order)
BIND("言語" AS ?description)
?language rdfs:label ?value_string .
FILTER (LANG(?value_string) = 'ja')
BIND(COALESCE(?value_string, ?q) AS ?value)
}
UNION
{
SELECT
(2 AS ?order)
("語彙素数" AS ?description)
(COUNT(*) AS ?value)
{
[] dct:language wd:Q5287 .
BIND(1 AS ?dummy)
}
GROUP BY ?dummy
}
UNION
{
SELECT
(3 AS ?order)
("語義数" AS ?description)
(COUNT(*) AS ?value)
{
[] ^ontolex:sense / dct:language wd:Q5287 .
BIND(1 AS ?dummy)
}
GROUP BY ?dummy
}
UNION
{
SELECT
(4 AS ?order)
("語形数" AS ?description)
(COUNT(*) AS ?value)
{
[] ^ontolex:lexicalForm / dct:language wd:Q5287 .
BIND(1 AS ?dummy)
}
GROUP BY ?dummy
}
UNION
{
BIND(10 AS ?order)
BIND("話者数" AS ?description)
?language wdt:P1098 ?value .
}
}
ORDER BY ?order