lodc2022-culture-art/content/docs/useful-datasets.md
2022-09-08 16:51:15 +09:00

4.6 KiB
Raw Permalink Blame History

title weight
SPARQLエンドポイントリスト 5

SPARQLエンドポイントリスト


{{< yasgui id="datasets" />}}


クエリ例

ジャパンサーチ: 「手塚治虫」の著作を取得する

https://jpsearch.go.jp/rdf/sparql/ {{< yasgui-query yasgui-id="datasets" title="「手塚治虫」の著作を取得する" endpoint="https://jpsearch.go.jp/rdf/sparql/" >}} PREFIX owl: http://www.w3.org/2002/07/owl# PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX schema: http://schema.org/ PREFIX jps: https://jpsearch.go.jp/term/property#

SELECT ?s ?label ?datePublished ?providerLabel WHERE { ?s schema:creator/owl:sameAs* http://id.ndl.go.jp/auth/entity/00083890 ; #https://mediaarts-db.bunka.go.jp/id/C48012 ; #http://ja.dbpedia.org/resource/手塚治虫 ; rdfs:label ?label ; schema:datePublished ?datePublished ; jps:sourceInfo [ schema:provider/rdfs:label ?providerLabel ; ] . } {{< / yasgui-query >}}

ジャパンサーチ: パブリックドメイン(CC0)な作品の画像を取得する

https://jpsearch.go.jp/rdf/sparql/ {{< yasgui-query yasgui-id="datasets" title="パブリックドメイン(CC0)な作品の画像を取得する" endpoint="https://jpsearch.go.jp/rdf/sparql/" >}} PREFIX owl: http://www.w3.org/2002/07/owl# PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX schema: http://schema.org/ PREFIX jps: https://jpsearch.go.jp/term/property#

SELECT ?class ?label ?creatorLabel ?media WHERE { ?s a ?class ; schema:creator/rdfs:label ?creatorLabel ; rdfs:label ?label ; jps:accessInfo [ schema:license http://creativecommons.org/publicdomain/zero/1.0/ ; schema:associatedMedia ?media ; ] . } {{< / yasgui-query >}}

LuciaDB: レギオンとその所属リリィの数を集計する

https://luciadb.assaultlily.com/sparql/query {{< yasgui-query yasgui-id="datasets" title="レギオンとその所属リリィの数を集計する" endpoint="https://luciadb.assaultlily.com/sparql/query" >}} PREFIX lilyrdf: https://luciadb.assaultlily.com/rdf/RDFs/detail/ PREFIX lily: https://luciadb.assaultlily.com/rdf/IRIs/lily_schema.ttl# PREFIX schema: http://schema.org/

SELECT ?s ?name (COUNT(DISTINCT ?member) AS ?members) WHERE { ?s a lily:Legion ; schema:name ?name ; schema:member ?member . FILTER (LANG(?name) = "ja") } GROUP BY ?s ?name {{< / yasgui-query >}}