linkeddata.jp study meeting #1

Post on 04-Jul-2015

3.798 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Open Semantic Frame Workとnon-RDFをRDF化するための仕様irON, commONの動作デモンストレーションです This presentation is about demonstration of open semantic web frame work "structWSF, irON, commON" at a linkeddata.jp first study meeting.

TRANSCRIPT

irONとStructWSFを用いたCSVデータのRDF化紹介

嘉村哲郎 / KAMURA, Tetsuro東京藝術大学芸術情報センター/ Tokyo University of the Arts

嘉村哲郎(総合研究大学院大学複合科学研究科後期博士課程,LODAC Project)

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

IRONとは

2

Instance Record and Object Notation Specificationhttp://openstructs.org/iron/iron-specification

米国Structured Dynamics社が開発・公開するnon-RDFデータをRDFデータ化するための仕様書

特にRDFトリプルやスキーマをRDFでないデータから作るためもの

非RDFデータとRDFデータの相互運用を可能にすることを目的とする

JSON,XML,CSVからRDFトリプルとスキーマ生成をサポートする

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

IRONが扱う機能要素

3

Attributeデータレコードやインスタンスが必ず持つ属性(メタデータ).

Type

データが何のデータであるか種類を記述し,意味的なクラス分けとそれらの関係を定義できるらしい(owl:Thingのようなもの)

Record

データレコードそのもの.メタデータとデータは対である必要がある.もちろん複数のデータから構成される

Dataset集合単位でデータ管理される.そのデータは何の集合か表す.データに対するデータベース名みたいなもの.

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

4

Schemaデータ作成の際に使用するtypeやAttributeの値,メタデータ機能をサポートする.つまりメタデータスキーマ・・・.タクソノミー的な使い方で,単純なデータ構造になる.

Linkage

データを他の形式へ変換するためのタイプ指定や,データのバージョン管理,AttributeとSchemaのマッピングを定める

「機能(モジュール)関連図」

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

IRON概念図

5

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

IRONで使用される語彙

6

各モジュールや機能で使用される語彙が定められている.例えばcreatorはIRONで予約されているが“Require”以外は自由に使える

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

Attributeに関する仕様

7

コア部分,メタデータ記述,インスタンス記述,スキーマ記述について必要有無や制限事項を定めている

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

IRONにおけるID取扱い

8

IRONはデータセットIDとインスタンスIDの2種類のIDを持つ.

データセットID = URI(インスタンスの1階層上までのURI)

インスタンスID = インスタンス名

FULL URI = データセットID + インスタンスID

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

2種類のIDによるデータ参照方法

9

データセットにおけるIDはURLを表す(http://database-a/)

インスタンスレコードのIDはインスタンス自身の名前(“a”)

内部でインスタンスを参照する場合は次のような仕組みで参照する

“@インスタンス名”は同じデータセット内のインスタンスを参照する “@@FULL-URI”は外部のデータセットのインスタンスを参照する

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

IRONデータの作り方

10

用意するデータは次の通り

Dataset Objectデータセットに関する記述のファイル

Instance Record Objectインスタンスが記述されたファイル

Structure Schema Objectメタデータスキーマが記述されたファイル

Linkage ObjectAttributeとスキーマをマッピングするファイル

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

XML@ Dataset + Record

11

<dataset><id>http://dataset.com/xyz/</id><linkage>http://dataset.com/schema/linkage.js</linkage><schema>http://dataset.com/schema/structure.js</schema>

</dataset>

<recordList><record>

<id>http://dataset.com/xyz/</id><prefLabel>Author Data</prefLabel><description>Dataset bibliographic publications</description><source>

<ref>@ustanford</ref><metaData>

<prefURL>http://www.stanford.edu/</prefURL><prefLabel>Stanford University</prefLabel>

</metaData></ source>...

</record></recordList>

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

XML@ Schema

12

<schema><version>0.1</version><typeList>

<Article><subTypeOf>Book</subTypeOf>

</Article><Book>

<subTypeOf>Document</subTypeOf></Book><Document>

<subTypeOf>Thing</subTypeOf></Document>

</typeList><attributeList>

<name><subPropertyOf>label</subPropertyOf><allowedValue>String</allowedValue><allowedType>Thing</allowedType>

</name><title>

<subPropertyOf>label</subPropertyOf><allowedValue>String</allowedValue><allowedType>Document</allowedType>

</title></attributeList>

</schema>

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

XML@ Linkage

13

<linkage><version>0.1</version><linkedType>application/rdf+xml</linkedType><prefixList>

<bibo>http://purl.org/ontology/bibo/</bibo><dcterms>http://purl.org/dc/elements/1.1/</dcterms>

</prefixList><attributeList>

<year><mapTo>dcterms:created</mapTo>

</year><author>

<mapTo>bibo:authorList</mapTo></author><isPartOf>

<mapTo>dcterms:isPartOf</mapTo></isPartOf>

</attributeList><typeList>

<Article><mapTo>bibo:Article</mapTo>

</Article></typeList>

</linkage>

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

commON CSVデータのRDF化

14

CSVデータの作り方

オブジェクトタイプの指定&&オブジェクト名

commONで使用可能なオブジェクトタイプ&&recordList&&dataset&&linkage

Attributeタイプの指定&attribute-name

&id&exhibitionHistory&isReferencedBy&P62I_is_depicted_by 等独自定義+必須要素を指定できる

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

CSV上のデータ例

15

1行目・・・オブジェクトを定義

2行目・・・メタデータを定義する

3行目・・・以降は実際のデータ内容になる

Dataset例

Record例

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター16

Linkage例

A列にはメタデータ要素や語彙,B列には語彙のURIが定義される

&attributeListには語彙を定義し,&typeListも同様に語彙を定義できるが前者のCardinalityが「0..*」に対して後者は「0-1」で定義される

このほか&prefixも定義できる

CSV作成用にスイーツツールがあるが普通のXSLデータ?

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

CSVの各データを1つのファイルにする

17

は単なる仕様書のため,これでRDF化はできない

フレームワークを使用した変換ツールを使う

JSONかcommONパーサを使うか

http://code.google.com/p/iron-notation/downloads/list

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

フレームワークツールを使う

18

なかなか動いてくれなくて今週睡眠不足になった原因↓

主なシステム構成・Ubuntu Linux・Apache Web Server・Apache Solar・Struct WSF・conStruct・Virtuoso・ARC2(PHP)・MySQL・Drupal

http://techwiki.openstructs.org/index.php/StructWSF_Installation_Guide

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

conStructの特徴

19

RDFデータはRDFデータストアVirtuosoに格納される(MySQLはDrupalポータルサイトツール用)

各種非RDFデータからRDFデータを生成することが出来るインポート機能を持つ

インポートがあるのでその逆もある

データセット閲覧機能

クラス階層表示など

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

20

Demonstration

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

まとめ

21

インポートしたデータのアップデート的なものがみあたらない

完全に動作していないため未解明な部分が多い.

CSVデータをキチンと作らないと怪しい表示になる(データ先頭に空白スペースなど)

確認出来た点 CSVデータからインポートし,RDF/XML,N3でエクスポート

ブラウザ上でリソースの表示,検索が可能→VirtuosoのインタフェースからSPARQL検索という手法も可能?

複雑な構造をもつ構造化データを扱うには向かない→とりあえずCSVデータを手軽にRDF化するような用途向け

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

References

22

irONhttp://techwiki.openstructs.org/index.php/Category:IrON

StructWFShttp://techwiki.openstructs.org/index.php/StructWSF_Installation_Guide

commON Parser Documentationhttp://openstructs.org/doc/code/commonparser/

Open Semantic Frameworkhttp://openstructs.org/open-semantic-framework

TokyoUniversity of the Arts

Art Media Center

東京藝術大学 芸術情報センター

23

ご静聴ありがとうございました

top related