Linked Dataを知る、作る、使う
-
Upload
hideaki-takeda -
Category
Technology
-
view
169 -
download
1
description
Transcript of Linked Dataを知る、作る、使う
![Page 1: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/1.jpg)
Linked Data を知る、作る、使う
武田英明[email protected] @takechan2000
国立情報学研究所NPO 法人 リンクト・オープン・データ・イニシアティブ
H-GIS 研究会、 2014 年 2 月 8 日、於:史料編纂所
![Page 2: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/2.jpg)
あらまし• オープンデータとは• Linked Data/Linked Open Data(LOD) とは• Linked Data を作る/公開する• Linked Data を使う
![Page 3: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/3.jpg)
オープンデータとは• データを公開するということ?• 情報公開とは違うの?
![Page 4: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/4.jpg)
オープンデータとは• オープンデータとは、誰でも自由に使えて
再利用もでき、かつ再配布できるようなデータである。課すべき決まりは、たかだか「作者のクレジットを残す」あるいは「同じ条件で配布する」程度である。http://opendatahandbook.org/ja/what-is-open-data/
• “A piece of data or content is open if anyone is free to use, reuse, and redistribute it — subject only, at most, to the requirement to attribute and/or share-alike.” http://opendefinition.org/
![Page 5: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/5.jpg)
データは情報流通社会の資源
自由に利用 自由に再加工
自由に再配布
![Page 6: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/6.jpg)
オープンデータに必要なもの• オープンライセンス
• 機械可読フォーマット
![Page 7: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/7.jpg)
オープンライセンス• 情報を最小限の制約以外で自由に使うこ
とを許すライセンス
CC0権利放棄
CC BY表示
CC BY-SA表示 - 継承
CC BY-NC表示 – 非営利
CC BY-ND表示 – 改変禁止
CC BY-NC-SA表示 - 非営利 - 継承
CC BY-NC-ND表示 - 非営利 - 改変禁止
全ての権利の主張
CC ライセンスいくつかの権利の主張
オープンライセンス
![Page 8: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/8.jpg)
機械可読フォーマット• 再利用性を高める
– 内容を切ったり、はったりできること
• 機械(コンピュータ)が内容を処理できる形式が望ましい– 特定のプログラムで処理できる– オープンなフォーマットで公開– Web のようにつながる
![Page 9: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/9.jpg)
オープンデータへの5つのステップ
どんなフォーマットでよいからオープンラインセスでデータ公開 例: PDF, jpg
コンピュータが処理可能なフォーマットで公開例: xls, doc
オープンに利用できるフォーマットで公開 例: csv
RDF (と SPARQL )でデータ公開 例: RDFa, RDF ストア
他へのリンクを入れたデータを公開
![Page 10: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/10.jpg)
データの公開、共有
Linked DataLinked Open Data (LOD)
![Page 12: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/12.jpg)
![Page 13: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/13.jpg)
文書の Web
![Page 14: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/14.jpg)
データの Web
このデータに対応する別のデータ
このデータに別のデータと同じ
この属性の意味は?
異なるデータ源のデータが相互に結びつく
![Page 15: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/15.jpg)
Linked Open Data (LOD)• オープンでリンクできるデータ
– 今の Web が“文書の Web” 、 LOD は“データのWeb”
• Linked Data の 4 原則– 事柄の名前に URI を使うこと– 名前の参照が HTTP URI でできること– URI を参照したときに関連情報が手に入るように
理解可能なデータを提供– 外部へのリンクも含めよう
(必ずしもオープンとは限らない⇒ Linked Data )
![Page 16: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/16.jpg)
Linked Data の記述のしかた• RDF(+RDFS, OWL) の利用
– 簡便な記述方法: < 主語 > < 述語 > < 目的語 > .
<http://www-kasm.nii.ac.jp/~takeda#me> rdfs:type foaf:Person .<http://www-kasm.nii.ac.jp/~takeda#me> foaf:name “ 武田英明” .<http://www-kasm.nii.ac.jp/~takeda#me> foaf:gender “male” .<http://www-kasm.nii.ac.jp/~takeda#me> foaf:knows <http://southampton.rkbexplorer.com/id/person07113> .
http://www-kasm.nii.ac.jp/~takeda#me
http://southampton.rkbexplorer.com/id/person07113
foaf:knows
foaf:Person
rdfs:type
“ 武田英明” “male”
foaf:name foaf:gender
![Page 17: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/17.jpg)
“1955-06-08”
Linked Data の記述
http://www-kasm.nii.ac.jp/~takeda#me
http://southampton.rkbexplorer.com/id/person-07113
foaf:knows
foaf:Person
rdfs:type
foaf:name foaf:gender
<http://dbpedia.org/resource/Tim_Berners-Lee>
owl:sameAs
dbpprop:birthDatedbpprop:birthPlacedbpprop:name
dbpedia:Computer_scientist
dbpprop:occupation
“ 武田英明” “male”
“London, England”“Sir Tim Berners-Lee”
![Page 19: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/19.jpg)
![Page 20: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/20.jpg)
LOD Cloud(Linking Open Data)
![Page 21: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/21.jpg)
日本の Linked Data Cloud
![Page 22: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/22.jpg)
日本の Linked Data Cloud
![Page 25: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/25.jpg)
Linked Data をどうやって作るか?
• スキーマ– 既存のスキーマを探す– そのまま使う/選択する/追加する– スキーマを公開する
• データ– データを一括して RDF に変換する/変換プログラム– 公開する
• ダンプファイル• SPARQL Endpoint• dereferenceable
![Page 26: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/26.jpg)
LOD のためのスキーマ・語彙• クラス / 概念の記述
– オントロジーにおける概念定義– 関係データベースのテーブルのスキーマ– オブジェクト指向プログラミングにおけるオブジェクト定
義• セマンティック Web でのクラス定義
– RDFS/OWL によるクラス記述• RDFS: 簡単なクラス定義• OWL: 記述論理に基づく
• Linked Data におけるクラス定義– 主に RDFS に基づく ( 例外 : owl:sameAs)– 簡単な構造 ( 主にプロパティー値の組 )
![Page 27: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/27.jpg)
LOD のためのスキーマ・語彙• スキーマ共有の重要性
– 相互運用性– 汎用アプリケーション
• スキーマ記述言語– RDFS– OWL
• よく使われるスキーマ– Dublin Core– FOAF (Friend-Of-A-Friend)– SKOS (Simple Knowledge Organization System)
![Page 28: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/28.jpg)
• rdf:type (http://www.w3.org/1999/02/22-rdf-syntax-ns#type)
– クラス / インスタンス関係• rdfs:subClassOf (http://www.w3.org/2000/01/rdf-schema#
subClassOf)
– スーパクラス /サブクラス関係• rdfs:subPropertyOf (http://www.w3.org/2000/01/rdf-schema#
subPropertyOf)
– スーパプロパティ /サブプロパティ関係
RDF/RDFS のプロパティ
![Page 29: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/29.jpg)
Usage of Common VocabulariesPrefix Namespace Used by
dc http://purl.org/dc/elements/1.1/ 66 (31.88 %)
foaf http://xmlns.com/foaf/0.1/ 55 (26.57 %)dcterms http://purl.org/dc/terms/ 38 (18.36 %)
skos http://www.w3.org/2004/02/skos/core# 29 (14.01 %)
akt http://www.aktors.org/ontology/portal# 17 (8.21 %)
geo http://www.w3.org/2003/01/geo/wgs84_pos# 14 (6.76 %)
mo http://purl.org/ontology/mo/ 13 (6.28 %)
bibo http://purl.org/ontology/bibo/ 8 (3.86 %)
vcard http://www.w3.org/2006/vcard/ns# 6 (2.90 %)
frbr http://purl.org/vocab/frbr/core# 5 (2.42 %)
sioc http://rdfs.org/sioc/ns# 4 (1.93 %)
LDOW2011 Presentation, Christian Bizer (Freie Universität
Berlin), 2011
![Page 30: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/30.jpg)
(Simple) Dublin Core
• 図書館コミュニティから
• DCMI (Dublin Core Metadata Initiative) による管理
• (Simple) Dublin Core– たった 15 要素– Simple is best– 値域制約はない– http://purl.org/dc/
elements/1.1/
• 15 elements– Title– Creator– Subject– Description– Publisher– Contributor– Date– Type– Format– Identifier– Source– Language– Relation– Coverage– Rights
![Page 31: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/31.jpg)
dc terms• Qualified Dublin Core
– 定義域と値域– より精緻な語彙
• simple dc の拡張
Properties abstract , accessRights , accrualMethod , accrualPeriodicity , accrualPolicy , alternative , audience , available , bibliographicCitation ,conformsTo , contributor , coverage , created , creator , date , dateAccepted , dateCopyrighted , dateSubmitted , description ,educationLevel , extent , format , hasFormat , hasPart , hasVersion , identifier , instructionalMethod , isFormatOf , isPartOf , isReferencedBy ,isReplacedBy , isRequiredBy , issued , isVersionOf , language , license , mediator , medium , modified , provenance , publisher , references ,relation , replaces , requires , rights , rightsHolder , source , spatial , subject , tableOfContents , temporal , title , type , valid
Properties in the /elements/1.1/namespace
contributor , coverage , creator , date , description , format , identifier , language , publisher , relation , rights , source , subject , title , type
Vocabulary Encoding Schemes DCMIType , DDC , IMT , LCC , LCSH , MESH , NLM , TGN , UDC
Syntax Encoding Schemes Box , ISO3166 , ISO639-2 , ISO639-3 , Period , Point , RFC1766 , RFC3066 , RFC4646 , RFC5646 , URI , W3CDTF
Classes Agent , AgentClass , BibliographicResource , FileFormat , Frequency , Jurisdiction , LicenseDocument , LinguisticSystem , Location ,LocationPeriodOrJurisdiction , MediaType , MediaTypeOrExtent , MethodOfAccrual , MethodOfInstruction , PeriodOfTime , PhysicalMedium ,PhysicalResource , Policy , ProvenanceStatement , RightsStatement , SizeOrDuration , Standard
DCMI Type Vocabulary Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text
Terms related to the DCMI Abstract Model
memberOf , VocabularyEncodingScheme
![Page 32: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/32.jpg)
Dcterms subPropertyOf Domain Range
contributor dc:contributor rdfs:Resource dcterms:Agent
creator dc:creator, dcterms:contributor rdfs:Resource dcterms:Agent
coverage dc:coverage rdfs:Resource dcterms:LocationPeriodOrJurisdiction
spatial dc:coverage, dcterms:coverage rdfs:Resource dcterms:Location
Temporal dc:coverage, dcterms:coverage rdfs:Resource dcterms:PeriodOfTime
Date dc:date rdfs:Resource rdfs:Literal
Available dc:date, dcterms:date rdfs:Resource rdfs:Literal
Created dc:date, dcterms:date rdfs:Resource rdfs:Literal
dateAccepted dc:date, dcterms:date rdfs:Resource rdfs:Literal
dateCopyrighted dc:date, dcterms:date rdfs:Resource rdfs:Literal
dateSubmitted dc:date, dcterms:date rdfs:Resource rdfs:Literal
Issued dc:date, dcterms:date rdfs:Resource rdfs:Literal
Modified dc:date, dcterms:date rdfs:Resource rdfs:Literal
Valid dc:date, dcterms:date rdfs:Resource rdfs:Literal
description dc:description rdfs:Resource rdfs:Resource
Abstract dc:description, dcterms:description rdfs:Resource rdfs:Resource
tableOfContents dc:description, dcterms:description rdfs:Resource rdfs:Resource
format dc:format rdfs:Resource dcterms:MediaTypeOrExtent
extent dc:format, dcterms:format rdfs:Resource dcterms:SizeOrDuration
Medium dc:format, dcterms:format dcterms:PhysicalResource dcterms:PhysicalMedium
Identifier dc:identifier rdfs:Resource rdfs:Literal
bibliographicCitation
dc:identifier, dcterms:identifier
dcterms:BibliographicResource rdfs:Literal
Language dc:language rdfs:Resource dcterms:LinguisticSystem
Publisher dc:publisher rdfs:Resource dcterms:AgentRelation dc:relation rdfs:Resource rdfs:Resource
source dc:source, dcterms:relation rdfs:Resource rdfs:Resource
Dcterms subPropertyOf Domain Range
conformsTo dc:relation, dcterms:relation rdfs:Resource dcterms:Standard
hasFormat dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
hasPart dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
hasVersion dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
isFormatOf dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
isPartOf dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
isReferencedBy dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
isReplacedBy dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
isRequiredBy dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
isVersionOf dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
References dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
Replaces dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
Requires dc:relation, dcterms:relation rdfs:Resource rdfs:Resource
Rights dc:rights rdfs:Resource dcterms:RightsStatementaccessRights dc:rights, dcterms:rights rdfs:Resource dcterms:RightsStatementLicense dc:rights, dcterms:rights rdfs:Resource dcterms:LicenseDocumentSubject dc:subject rdfs:Resource rdfs:Resourcetitle dc:title rdfs:Resource rdfs:Resourcerdfs:Literalalternative dc:title, dcterms:title rdfs:Resource rdfs:Resourcerdfs:Literaltype dc:type rdfs:Resource rdfs:Classaudience rdfs:Resource dcterms:AgentClasseducationLevel dcterms:audience rdfs:Resource dcterms:AgentClassmediator dcterms:audience rdfs:Resource dcterms:AgentClass
accrualMethod dcmitype:Collection dcterms:MethodOfAccrual
accrualPeriodicity dcmitype:Collection dcterms:Frequency
accrualPolicy dcmitype:Collection dcterms:Policy
instructionalMethod rdfs:Resource dcterms:MethodOfInstructionprovenance rdfs:Resource dcterms:ProvenanceStatementrightsHolder rdfs:Resource dcterms:Agent
http://www.kanzaki.com/docs/sw/dc-domain-range.htmlhttp://dublincore.org/documents/dcmi-terms/
![Page 33: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/33.jpg)
The Friend of a Friend (FOAF)• 人と人の関係のメタデータ• 自主的なプロジェクト
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix foaf: <http://xmlns.com/foaf/0.1/> .@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . <#JW> a foaf:Person ; foaf:name "Jimmy Wales" ; foaf:mbox <mailto:[email protected]> ; foaf:homepage <http://www.jimmywales.com/> ; foaf:nick "Jimbo" ; foaf:depiction <http://www.jimmywales.com/aus_img_small.jpg> ; foaf:interest <http://www.wikimedia.org> ; foaf:knows [ a foaf:Person ; foaf:name "Angela Beesley" ] . <http://www.wikimedia.org> rdfs:label "Wikipedia" .
Classes: | Agent | Document | Group | Image | LabelProperty | OnlineAccount | OnlineChatAccount | OnlineEcommerceAccount | OnlineGamingAccount | Organization | Person | PersonalProfileDocument | Project |Properties: | account | accountName | accountServiceHomepage | age | aimChatID | based_near | birthday | currentProject | depiction | depicts | dnaChecksum | familyName | family_name | firstName | focus | fundedBy | geekcode | gender | givenName | givenname | holdsAccount | homepage | icqChatID | img | interest | isPrimaryTopicOf | jabberID | knows | lastName | logo | made | maker | mbox | mbox_sha1sum | member | membershipClass | msnChatID | myersBriggs | name | nick | openid | page | pastProject | phone | plan | primaryTopic | publications | schoolHomepage | sha1 | skypeID | status | surname | theme | thumbnail | tipjar | title | topic | topic_interest | weblog | workInfoHomepage | workplaceHomepage | yahooChatID |
![Page 34: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/34.jpg)
SKOS (Simple Knowledge Organization System)
• タキソノミーに関するメタデータ– 概念の階層的構造
• 件名標目のようなタキソノミーにために設計• 上位下位関係はクラス・サブクラス関係とは一致し
ない• W3C Recommendation 18 August 2009
![Page 35: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/35.jpg)
SKOS (Simple Knowledge Organization System)
• SKOS Core (hierarchical concept structure)– skos:semanticRelation– skos:broaderTransitive – skos:narrowerTransitive– skos:broader – skos:narrower– skos:related– skos:preflabel– skos:altlabel– skos:hiddenlabel
subPropertyOf
![Page 36: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/36.jpg)
SKOS (Simple Knowledge Organization System)
• SKOS Mapping– skos:mappingRelation– skos:closeMatch– skos:exactMatch– skos:broadMatch– skos:narrowMatch– skos:relatedMatch
subPropertyOf
![Page 37: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/37.jpg)
Linked Open Vocabulary (LOV)
• 語彙流通のためのプラットフォーム– スキーマの登録– スキーマの検索
• http://labs.mondeca.com/dataset/lov/
• MetaBridge ( 日本)– http://www.metabridge.jp/
![Page 38: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/38.jpg)
More Info.
• http://www.w3.org/2005/Incubator/lld/wiki/Vocabulary_and_Dataset
![Page 39: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/39.jpg)
スキーマ・語彙のまとめ• いくつかの有名なスキーマ
– DC, DC terms, FOAF, SKOS …• もっと多い専門的スキーマ
– CIDOC CRM– PRISM– …
• 再利用を強く推奨– LOV
![Page 40: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/40.jpg)
データを作る/公開する• 既存のデータを一括して変換する
– csv から変換する• Open refine• Linkdata.org
– RDF を公開する• RDB から変換して公開する
– D2R
![Page 41: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/41.jpg)
RDF refine
• Open refine– テーブル型のデータの洗練、変換ツール
• RDF refine– Open refine の拡張– RDFS の設定とそれに基づく RDF出力
![Page 42: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/42.jpg)
![Page 43: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/43.jpg)
![Page 44: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/44.jpg)
Linkdata.org
• 理研が開発• csv を読み込んで簡単に RDF化
![Page 45: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/45.jpg)
SparqlEPCU• 簡単 SPARQL Endpoint 公開
http://lodcu.cs.chubu.ac.jp/SparqlEPCU/index.jsp
![Page 46: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/46.jpg)
SPARQL Timelinerhttp://uedayou.net/SPARQLTimeliner/ukiyoe/
![Page 47: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/47.jpg)
D2R
• RDB からマッピングを通じて RDF を出力
• マッピングファイル– 例
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> . map:posts_lat a d2rq:PropertyBridge; d2rq:belongsToClassMap map:posts; d2rq:property geo:lat; d2rq:propertyDefinitionLabel "posts lat"; d2rq:sqlExpression "posts.lat / (60.0 * 60.0 * 1000.0)"; d2rq:datatype xsd:double; .
From http://qiita.com/sawamur@github/items/02b3ddfa3187df300342
![Page 48: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/48.jpg)
データセットの登録• データセットが見つけやすいように、
データカタログに登録する• CKAN
![Page 49: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/49.jpg)
![Page 50: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/50.jpg)
![Page 51: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/51.jpg)
Linked Data をどうやって使うのか
Things Things Things Things Things
Linked Data Browser
Linked Data Mashup
Linked Data Search Engine
SPARQL
RDF Store
![Page 52: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/52.jpg)
Tabulator
![Page 54: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/54.jpg)
SPARQL
• RDF データ問い合わせ言語• SQL に似た構造
PREFIX foaf: <http://xmlns.com/foaf/0.1/>SELECT ?nameWHERE { ?person foaf:name ?name . }
クエリの変数
クエリのパターン (Turtle 形式 )
クエリのフォーム
RDF Store
(RDF Database)
SPAQL
Query
SPARQL Query Language for RDFW3C Recommendation 15 January 2008http://www.w3.org/TR/rdf-sparql-query/
![Page 55: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/55.jpg)
http://ja.dbpedia.org/resource/ 慶應義塾大学
![Page 56: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/56.jpg)
http://ja.dbpedia.org/sparql
![Page 57: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/57.jpg)
dbp-owl:AdministrativeRegiondbp: サイボーグ 009
dbp-owl:ComicsCreator
dbp: 宮城県
dbp: 石ノ森章太郎
rdfs:label
rdf:type
rdfs:label
dbp-prop: 生年
dbp-owl:notableWork
dbp-owl:award
dbp-owl:birthPlace
rdf:type
サイボーグ 009
宮城県 foaf:Person
1938
rdf:type
rdfs:label
dbp: 村井嘉浩
dbp-owl:leaderName
dbp: 手塚治虫文化賞
dbp-owl:Comics
rdf:type
クエリ : 手塚治虫文化賞を受賞した漫画家の代表的な漫画PREFIX dbp: <http://ja.dbpedia.org/resource/>PREFIX dbp-owl: <http://dbpedia.org/ontology/>
SELECT ?creatorName ?comicNameWHERE { ?creator a dbp-owl:ComicsCreator ; dbp-owl:award dbp: 手塚治虫文化賞 ; dbp-owl:notableWork ?comic ; rdfs:label ?creatorName . ?comic a dbp-owl:Comics ; rdfs:label ?comicName .}
石ノ森章太郎
![Page 58: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/58.jpg)
![Page 59: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/59.jpg)
クエリのフォームと返値
Query form Results
SELECT, ASK XML, (JSON)
CONSTRUCT,DESCRIBE
RDF Graph
![Page 60: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/60.jpg)
CONSTRUCT
PREFIX foaf: <http://xmlns.com/foaf/0.1/>CONSTRUCT { ?person foaf:name ?name .}FROM <http://fumi.me/foaf.rdf>WHERE { ?person foaf:name ?name .}
![Page 61: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/61.jpg)
複数クエリパターンの利用PREFIX foaf: <http://xmlns.com/foaf/0.1/>SELECT *WHERE { ?person foaf:name ?name . ?person foaf:mbox ?email .}
PREFIX foaf: <http://xmlns.com/foaf/0.1/>SELECT *WHERE { ?person foaf:name ?name; foaf:mbox ?email .}
全変数
複数パターンへのマッチ
![Page 62: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/62.jpg)
接続グラフPREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>SELECT ?name ?uriWHERE { ?person foaf:knows ?who . ?who foaf:name ?name; rdfs:seeAlso ?uri .}
?person
?name
?who?urifoaf:knows
foaf:name
rdfs:seeAlso
![Page 63: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/63.jpg)
オプション• OK if it is not matched but return values if matched
PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>SELECT ?name ?uriWHERE { ?person foaf:knows ?who . ?who foaf:name ?name . OPTIONAL { ?who rdfs:seeAlso ?uri . }}
![Page 64: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/64.jpg)
修飾子( Modifiers )PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>SELECT ?name ?uriWHERE { ?person foaf:knows ?who . ?who foaf:name ?name; OPTIONAL { rdfs:seeAlso ?uri . }} 昇順 (降順なら ORDER BY DESC(?name) )
解の個数の上限
ORDER BY ?nameLIMIT 10
![Page 65: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/65.jpg)
和( UNION )
PREFIX foaf: <http://xmlns.com/foaf/0.1/>SELECT ?name ?mboxWHERE { { ?person foaf:name ?name; foaf:mbox ?mbox . } UNION { ?person foaf:name ?name; foaf:mbox_sha1sum ?mbox . }}
![Page 66: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/66.jpg)
FILTER: regex
PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-
schema#>SELECT DISTINCT ?name ?emailFROM <http://fumi.me/foaf.rdf>WHERE { ?person foaf:name ?name; foaf:mbox ?email . FILTER regex(str(?email), "w3.org”, “i”)}
![Page 67: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/67.jpg)
![Page 68: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/68.jpg)
施 設
ユーザYokohama Art Spot
RDFストア
SPARQLエンドポイント
RDFストア
SPARQLエンドポイント
XML
SPARQL
LODAC Museum
横浜 LOD
作品
所蔵館
アーティスト
アーティスト
施設
イベント
Yokohama Art Spot の構成
全体マップ表示における処理
施設
イベント
HTMLJavaScriptPythonSPARQLWrapper
OWLIM SE
ARC2
RDFストア
SPARQLエンドポイント
PinQA
質問
回答
ユーザ
SPARQL
JSON
SPARQL
JSON
D2R
スポット
![Page 69: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/69.jpg)
施設情報ページにおける情報取得と表示
標準化された形式で記述
ユーザに適した表示が簡単に実現可能
利用
![Page 70: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/70.jpg)
育なび .net
![Page 71: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/71.jpg)
育なび .net のシステム育なび .net
保育園データ
保育所空き状況データ
医療機関データ
防災・減災データ
他
元データは ExcelRDF に変換
RDF ストア
データ格納
SPARQL を発行
レスポンス
Web サーバ ブラウザ
![Page 72: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/72.jpg)
育なび .net
公園データ
広域避難場所データ 駐車場データ
健康遊具データ
![Page 73: Linked Dataを知る、作る、使う](https://reader037.fdocument.pub/reader037/viewer/2022102823/540d7e2f8d7f72747e8b49f3/html5/thumbnails/73.jpg)
まとめ• Linked Open Data (LOD) とは
– “ データの Web” 、つながるデータ– データの再利用性を高める
• LOD の技術– RDF, RDFS, OWL– SPQARL
• LOD をどう使うか– マッシュアップアプリケーション
• データを使い回す– データマネージメント