狠狠撸

狠狠撸Share a Scribd company logo
????? ??
???
?????
2
? ??: ???? ??? ??+??
? ??德
? ???? ??? 2007?~
? ??? ???? ??? 2010?~
? ????: Cloud, ???, PHP, ?????, HTML5
3
?? ? ???????
? ???? Q
? ???? P
? ??? ? ????
?????? ????…
????? ???? ???? ?? ?? ???
(??)??? ?? ??? ???? ???? ??DB
4
cf. Dbpedia, Freebase? ?? ???
machine readable, machine understandable
??? ???
5
?????? ?? 2012? ??
?? ??
?? ???? ??? ????
?? ? ?? ?? ?? ??? ??
?? ????
cf. ??? ??
?????? ?????…
????? ???? ????, ?? ?? ???? ?? ???
????? + ?????
?????
? ????? ????(????) ??
? ?? Wikibase Repository? ??(?? ??)
?? ????(?: ????)?? ??? ??
? http://wikiba.se/
6
cf. ??? ???
???*
? ????
? ????? ??
? ?????
? ??????
? ???????
? ?????
?????? ???? ??
7
???
? ????
? ??????
? ????
? ?????
? ?????
? ???
* Multilingual. ??? ?????? ???? ??
8
?? ? ?? ???? vs ?????
4.8
17.3
0
5
10
15
20
'01 '02 '03 '04 '05 '06 '07 '08 '09 '10 '11 '12 '13 '14 '15
???(??:???)
?? ( 1? ?? )
???? (???) ?????
http://stats.wikimedia.org/EN/TablesWikipediaEN.htm
http://stats.wikimedia.org/wikispecial/EN/TablesWikipediaWIKIDATA.htm
??? ????? ★★★★★
??? ?? ?? ???
?? Entity ?? + ?? + ??
?? Item ?? ??, ??, ??, ?? ? Q??
?? Property ??? ??, Item?? ?? P??
?? Query ????? ???
9
Q1 ??? 2012-10-29
P6 ??? 2013-02-04
?????? ?? ??
10
1?? 2?? 3??
? Item ???
? ???? ?? ??
? Property ???
? Infobox ?? ??
? Query ???
2013?
???? ?? ??
?? ? ??, ??? ?
Item ? Q
11
※ ????? Item??? ??? Q?? ????
Q? ??, ??, ??, ?? ?
12
? “??”
? “?? ?”
? ???? ? ??
? ???: Q??
? [[Q76]]
?? ?????… ??, ??, ??, ??
13
?? ??* Q?? ?? ?? Q??
Barack Obama Q76 love Q316
Park Geun-hye Q138048 peace Q454
The Wealth of Nations Q233562 Earth Q2
Hunminjeongeum Q18990 South Korea Q884
September 11 attacks Q10806 Hussein Onyango Obama Q15982328
Korean War Q8663
birth certificate of
Barack Obama
Q14527788
? Q??? ??? ?????? ?? ????
? Notability(?????; ???) ????
* ????? label
???? Q?? ?? ????? ? ?
14
http://www.wikidata.org/wiki/Special:ItemByTitle/enwiki/Barack_Obama
http://www.wikidata.org/wiki/Special:ItemByTitle/kowiki/??_???
[[d:Special:ItemByTitle/enwiki/Barack_Obama]]
[[d:Special:ItemByTitle/kowiki/??_???]]
15
http://www.wikidata.org/wiki/Q76 ★
http://www.wikidata.org/entity/Q76
http://www.wikidata.org/w/index.php?title=Q76
http://www.wikidata.org/wiki/Special:EntityData/Q76
http://www.wikidata.org/wiki/Special:EntityData/Q76.json
???? ??? [[d:Q76]] ?? [[wikidata:Q76]]
{
"entities":{
"Q76":{
"pageid":205,
"ns":0,
"title":"Q76",
"lastrevid":270428856,
"modified":"2015-11-10T17:03:19Z",
"type":"item",
"id":"Q76",
"labels":{
"en":{
"language":"en",
"value":"Barack Obama"
},
…
Q??? ?? ?? Q??? ? ?
Q?? ?? ??? ???
16
Q76
??
Q76
???
????
Q?? ?? ??? ??? Q? ????
17
Q76
??
Q76
???
??
alias ( a.k.a )
??
description
??
??? P?? ? ??? ??…
???
18
??
?? ???
label description ??? ??
Q2 Earth
third planet closest to the
Sun in the Solar System
?? ???? ?? ??
Q42 Douglas Adams English writer ???? ??? ??? ??
Q64 Berlin
capital city and state of Ge
rmany
??? ??? ??
Q80 Tim Berners-Lee Web developer ? ????
Q148
People's Republic
of China
state in East Asia ???????
????? ?? (+ a.k.a.
“??”)
Q153 ethanol type of alcohol compound ???
Q316 love
strong, positive emotion b
ased on affection
??
Q405 Moon
only natural satellite of Ear
th
? ??? ????
Q897511 cryptanalysis science ????
Q4489310 Turing reduction
2015-11-20 ?? ? ?
Q ?? ????? ????
?? ? ??? http://www.wikidata.org/wiki/Wikidata:Tours/ko
19
???? ?? Q? ??!
??·????? ????
???
??
???
??? ??
???
???
??? Q
????? ????*
* ???? ?? ??? ?? ????? ?????? ???
Q??? ?? ?????
20
? ?????? ?? ??? ?
? ???? ??? ????? ?? ?
???????
??? + ??
?: ?? ????? ?? ???
???: ????, ????, ????, ???, ?????, ????? ?? ?
1? ??? ?????? ??
? Q??? ????? AUTO INCREMENT ??
? ??? ??? 1?? Q???? ???? ?? ?? ??
? ?????? ????(REDIRECT) ??·?? ??
??
???
Barack
Obama
Q76 Q123
バラク?
オバマ
xo oo
????? ? ??? ???? ?? ( X )
Property ? P
21
22
P? ??
? Item*? ??
? Item? ????**
? ???: P??
? [[Property:P22]]
? [[P:P22]]
* ???? Entity
** P-P, Q-value ??? ??
23
http://www.wikidata.org/wiki/Property:P22 ★
http://www.wikidata.org/wiki/P:P22
http://www.wikidata.org/entity/P22
http://www.wikidata.org/w/index.php?title=P:P22
http://www.wikidata.org/wiki/Special:EntityData/P22
http://www.wikidata.org/wiki/Special:EntityData/P22.json
???? ???? d:P:P22 ( wikidata:P:P22 )
P??? ?? ?? P??? ? ?
Q??? https://www.wikidata.org/wiki/Q76P??? https://www.wikidata.org/wiki/Property:P22
??? ??
??? Q, P ??
24
Q76
Barack Obama
Q138048
Park Geun-hye
Q405
Moon
Q6495593
Barack Obama, Sr.
Q15982328
Hussein OnyangoObama
Q14356
Park Chung-hee
Q6784157
Park Seong-bin
(P22) father
(P40) child
Q2
Earth
Q525
Sun
astronomical body (P397)
child astronomical body (P398)
P22 ↑ ↓ P40
P22 ↑ ↓ P40
P22 ↑ ↓ P40
P22 ↑ ↓ P40
P397 ↑ ↓ P398
P397 ↑ ↓ P398
Q??? P?? ???
25
Q?? ??? P?? ???
Q21 ???? P21 ??
Q22 ????? P22 ???
Q23 ?? ??? P23 (??)
Q24 ? ??? P24 (??)
Q25 ??? P25 ???
? Q??? P??? ????
? ?? ???? ?? ??
Q290
??
P21
??
Q7565
???
P22
???
Wikidata property (P1687)
subject item of this property (P1629)
? Q? P? ?? ?? ??? ??
P1687 ↑ ↓ P1629
P1687 ↑ ↓ P1629
Q · P ?? ?? ?? Q · P ?? ?? ??
P ?? ??
26http://www.wikidata.org/wiki/Wikidata:Introduction
P?? ???
P6 ?? ??
P131 ?? ?? ??
P625 ?? ??
P1082 ?? ?? ??
P25 ???
P1082
P6
P131
P131
P625
?P? ??? ?? ? Item? ?? ??
??? Property ??
P ??? ??? ??????(Q62)? P
27
?? population (P1082) ?? head of government (P6)
?? ?? ?????
28
??? ???
29
??? ?!
30
??? ? RDF, SPARQL…
??? ? ??
http://en.wikipedia.org/wiki/Semantic_Web_Stack
cf. OSI 7??, ??? ??
RDF Resource Desciription Framework
? ??? ?? ??. W3C ??
? ???? ????? ??? ??
? ????? ???? ??? ??
SPARQL SPARQL Protocol and RDF Query Language
? RDF ??? ?? ?? ??
? “??? ???? SQL”
31
RDF ??
? Dog1 is an animal
? Cat1 is a cat
? Cats are animals
? Zoos host animals
? Zoo1 hosts the Cat2
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.org/> .
@prefix zoo: <http://example.org/zoo/> .
ex:dog1 rdf:type ex:animal .
ex:cat1 rdf:type ex:cat .
ex:cat rdfs:subClassOf ex:animal .
zoo:host rdfs:range ex:animal .
ex:zoo1 zoo:host ex:cat2 .
http://en.wikipedia.org/wiki/RDF_Schema
32
SPARQL ??
PREFIX ex: <http://example.org/>
SELECT ?animal WHERE
{ ?animal a ex:animal . }
animal
<http://example.org/dog1>
<http://example.org/cat1>
<http://example.org/cat2>
SPARQL ?? ?? ??
http://en.wikipedia.org/wiki/RDF_Schema
33
????? RDF ??
?? ??
???? ???
???
???? ????
?? ?????
??
?? ?? ???
s statement ??
v value ?
q qualifier ???
r reference ????
P ?????? ???(Q42)? ???(P26)
34
[?? ??] references
??????(Q62)? ??(P1082)
?? ???(Q62)? ????(P569)
http://ko.wikipedia.org/wiki/????:??_???
Q14527788
35
????? SPARQL ?? #1
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?politician ?cause ?politician_label ?cause_of_death_label WHERE {
?politician wdt:P106 wd:Q82955 . # find items that have "occupation
(P106): politician (Q82955)"
?politician wdt:P509 ?cause . # with a P509 (cause of death) claim
?cause wdt:P279* wd:Q12078 . # ... where the cause is a subclass
of (P279*) cancer (Q12078)
# ?politician wdt:P39 wd:Q11696 . # Uncomment this line to include only
U.S. Presidents
OPTIONAL {?politician rdfs:label ?politician_label filter
(lang(?politician_label) = "en") .}
OPTIONAL {?cause rdfs:label ?cause_of_death_label filter
(lang(?cause_of_death_label) = "en").}
}
ORDER BY ASC (?politician)
Total results: 557, duration: 633 ms.
??? ??? ??? ??
politician cause politician_label cause_of_death_label
Q1027427 Q189588 John R. Fellows stomach cancer
Q1028400 Q3242950Károly Grósz kidney cancer
Q10320767Q189588 Luiz Gushiken stomach cancer
Q10376143Q47912 Sérgio Guerra lung cancer
Q1064774 Q47912 Charles Hayes lung cancer
Q10664 Q188874 Neville Chamberlain colorectal cancer
Q10664 Q5526839Neville Chamberlain gastrointestinal cancer
….
??? Q: politician (Q82955), cancer (Q12078)
??? P: occupation (P106), subclass of (P279), cause of death (P509)
36
????? SPARQL ?? #2
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX q: <http://www.wikidata.org/prop/qualifier/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
SELECT DISTINCT ?city ?cityLabel ?mayor ?mayorLabel WHERE {
?city wdt:P31/wdt:P279* wd:Q515 . # find instances of subclasses of city
?city p:P6 ?statement . # with a P6 (head of goverment) statement
?statement v:P6 ?mayor . # ... that has the value ?mayor
?mayor wdt:P21 wd:Q6581072 . # ... where the ?mayor has P21 (sex or gender)
female
FILTER NOT EXISTS { ?statement q:P582 ?x } # ... but the statement has no P582
(end date) qualifier
# Now select the population value of the ?city
# (wdt: properties use only statements of "preferred" rank if any, usually meaning
"current population")
?city wdt:P1082 ?population .
# Optionally, find English labels for city and mayor:
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
} ORDER BY DESC(?population) LIMIT 10
Total results: 10, duration: 7180 ms.
city cityLabel mayor mayorLabel
Q2807 Madrid Q19592761 Manuela Carmena
Q90 Paris Q2851133 Anne Hidalgo
Q16555 Houston Q213847 Annise Parker
Q1563 Havana Q6774124 Marta Hernández Romero
Q270 Warsaw Q271902 Hanna Gronkiewicz-Waltz
Q1492 Barcelona Q4779594 Ada Colau
Q472 Sofia Q444718 Yordanka Fandakova
Q1085 Prague Q18104657 Adriana Krná?ová
Q365 Cologne Q19285371 Henriette Reker
Q23197 Nashville Q16164719 Megan Barry
????? ???? ?? ? ?? ?? TOP 10
??? Q: city (Q515), female (Q6581072)
??? P: instance of (P31), subclass of (P279), head of government (P6),
sex or gender (P21), end time (P582), population (P1082)
37
?????? ??
?? ?? ???? ??? ? ???
? ???? ??? ???…
? ??? ?? ??? ???…
? TTS, ???? ??? ???…
“???? ?? ?? ?? ??.”
38
<?>
?????
?????
https://en.wikipedia.org/wiki/Wikidata
https://en.wikipedia.org/wiki/Wikipedia:Wikidata
https://meta.wikimedia.org/wiki/Wikidata/Deployment_Questions
http://www.slideshare.net/MagnusManske/20140227-wikidata-talk-cambridge
http://meta.wikimedia.org/wiki/Wikidata/Development/RDF
http://tools.wmflabs.org/wikidata-exports/rdf/
?????
https://www.wikidata.org/wiki/Special:Version
http://wikiba.se/
??? ?
https://en.wikipedia.org/wiki/Semantic_Web
https://en.wikipedia.org/wiki/Semantic_Web_Stack
SPARQL
https://commons.wikimedia.org/wiki/File:Wikidata%27s_SPARQL_introduction_presentation.pdf
https://www.mediawiki.org/wiki/Wikibase/Indexing/SPARQL_Query_Examples
39
?? ??
Ad

Recommended

???? ?? ? ????
???? ?? ? ????
Dongbum Kim
?
SPARQL ???
SPARQL ???
?? ?
?
RDF ?? ? ?? ??
RDF ?? ? ?? ??
Dongbum Kim
?
Neo4J ??
Neo4J ??
?? ?
?
搁贰厂罢蹿耻濒とは
搁贰厂罢蹿耻濒とは
星影 月夜
?
Git? ?? ? ????!
Git? ?? ? ????!
Young Kim
?
Stateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWT
Mobiliya
?
Rest API
Rest API
Rohana K Amarakoon
?
Spring Data RESTを利用したAPIの設計と、作り直しまでの道のり
Spring Data RESTを利用したAPIの設計と、作り直しまでの道のり
Rakuten Group, Inc.
?
RDF? Graph? ?? ? ??? Spartial&Graph ??
RDF? Graph? ?? ? ??? Spartial&Graph ??
?? ?
?
gRPC vs REST: let the battle begin!
gRPC vs REST: let the battle begin!
Alex Borysov
?
Web API: The Good Parts 落穂ひろい
Web API: The Good Parts 落穂ひろい
API Meetup
?
[H3 2012] ????? ?? ?? ??
[H3 2012] ????? ?? ?? ??
KTH, ??????
?
Understanding REST
Understanding REST
Nitin Pande
?
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.8.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.8.0対応)
fisuda
?
搁顿贵/翱奥尝の概要及び翱厂厂実装、及び活用イメージについて
搁顿贵/翱奥尝の概要及び翱厂厂実装、及び活用イメージについて
Masayuki Isobe
?
?????? ??????? ??????????? [???]
?????? ??????? ??????????? [???]
Yurim Jin
?
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)
fisuda
?
Building RESTful Java Applications with EMF
Building RESTful Java Applications with EMF
Kenn Hussey
?
Redis trouble shooting
Redis trouble shooting
DaeMyung Kang
?
ROS.js の紹介
ROS.js の紹介
Honma Masashi
?
High Performance, Scalable MongoDB in a Bare Metal Cloud
High Performance, Scalable MongoDB in a Bare Metal Cloud
MongoDB
?
Hyperledger Fabric practice (v2.0)
Hyperledger Fabric practice (v2.0)
wonyong hwang
?
Microsoft Graph APIを活用した社内アプリケーション開発
Microsoft Graph APIを活用した社内アプリケーション開発
Yuki Hattori
?
REST API Best (Recommended) Practices
REST API Best (Recommended) Practices
Rasheed Waraich
?
Apresentacap qaninjaconf
Danilo Santos
?
??? ?????: ??? ??? ??
??? ?????: ??? ??? ??
Haklae Kim
?
Introduction to question answering for linked data & big data
Introduction to question answering for linked data & big data
Andre Freitas
?

More Related Content

What's hot (20)

Stateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWT
Mobiliya
?
Rest API
Rest API
Rohana K Amarakoon
?
Spring Data RESTを利用したAPIの設計と、作り直しまでの道のり
Spring Data RESTを利用したAPIの設計と、作り直しまでの道のり
Rakuten Group, Inc.
?
RDF? Graph? ?? ? ??? Spartial&Graph ??
RDF? Graph? ?? ? ??? Spartial&Graph ??
?? ?
?
gRPC vs REST: let the battle begin!
gRPC vs REST: let the battle begin!
Alex Borysov
?
Web API: The Good Parts 落穂ひろい
Web API: The Good Parts 落穂ひろい
API Meetup
?
[H3 2012] ????? ?? ?? ??
[H3 2012] ????? ?? ?? ??
KTH, ??????
?
Understanding REST
Understanding REST
Nitin Pande
?
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.8.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.8.0対応)
fisuda
?
搁顿贵/翱奥尝の概要及び翱厂厂実装、及び活用イメージについて
搁顿贵/翱奥尝の概要及び翱厂厂実装、及び活用イメージについて
Masayuki Isobe
?
?????? ??????? ??????????? [???]
?????? ??????? ??????????? [???]
Yurim Jin
?
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)
fisuda
?
Building RESTful Java Applications with EMF
Building RESTful Java Applications with EMF
Kenn Hussey
?
Redis trouble shooting
Redis trouble shooting
DaeMyung Kang
?
ROS.js の紹介
ROS.js の紹介
Honma Masashi
?
High Performance, Scalable MongoDB in a Bare Metal Cloud
High Performance, Scalable MongoDB in a Bare Metal Cloud
MongoDB
?
Hyperledger Fabric practice (v2.0)
Hyperledger Fabric practice (v2.0)
wonyong hwang
?
Microsoft Graph APIを活用した社内アプリケーション開発
Microsoft Graph APIを活用した社内アプリケーション開発
Yuki Hattori
?
REST API Best (Recommended) Practices
REST API Best (Recommended) Practices
Rasheed Waraich
?
Apresentacap qaninjaconf
Danilo Santos
?
Stateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWT
Mobiliya
?
Spring Data RESTを利用したAPIの設計と、作り直しまでの道のり
Spring Data RESTを利用したAPIの設計と、作り直しまでの道のり
Rakuten Group, Inc.
?
RDF? Graph? ?? ? ??? Spartial&Graph ??
RDF? Graph? ?? ? ??? Spartial&Graph ??
?? ?
?
gRPC vs REST: let the battle begin!
gRPC vs REST: let the battle begin!
Alex Borysov
?
Web API: The Good Parts 落穂ひろい
Web API: The Good Parts 落穂ひろい
API Meetup
?
[H3 2012] ????? ?? ?? ??
[H3 2012] ????? ?? ?? ??
KTH, ??????
?
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.8.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.8.0対応)
fisuda
?
搁顿贵/翱奥尝の概要及び翱厂厂実装、及び活用イメージについて
搁顿贵/翱奥尝の概要及び翱厂厂実装、及び活用イメージについて
Masayuki Isobe
?
?????? ??????? ??????????? [???]
?????? ??????? ??????????? [???]
Yurim Jin
?
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)
fisuda
?
Building RESTful Java Applications with EMF
Building RESTful Java Applications with EMF
Kenn Hussey
?
High Performance, Scalable MongoDB in a Bare Metal Cloud
High Performance, Scalable MongoDB in a Bare Metal Cloud
MongoDB
?
Hyperledger Fabric practice (v2.0)
Hyperledger Fabric practice (v2.0)
wonyong hwang
?
Microsoft Graph APIを活用した社内アプリケーション開発
Microsoft Graph APIを活用した社内アプリケーション開発
Yuki Hattori
?
REST API Best (Recommended) Practices
REST API Best (Recommended) Practices
Rasheed Waraich
?
Apresentacap qaninjaconf
Danilo Santos
?

Viewers also liked (9)

??? ?????: ??? ??? ??
??? ?????: ??? ??? ??
Haklae Kim
?
Introduction to question answering for linked data & big data
Introduction to question answering for linked data & big data
Andre Freitas
?
An Ambitious Wikidata Tutorial
An Ambitious Wikidata Tutorial
_Emw
?
Deep Reasoning
Deep Reasoning
Taehoon Kim
?
??? ????? ???
??? ????? ???
Hyun-woo Park
?
Differentiable Neural Computer
Differentiable Neural Computer
Taehoon Kim
?
Summernote ??? - ????(@hackerwins)
Summernote ??? - ????(@hackerwins)
?????
?
???? ??? ?????? ????
???? ??? ?????? ????
?? ?
?
????? ??? ?? ????? ?? ?? ??? ???? TensorFlow KR Meetup 2016
????? ??? ?? ????? ?? ?? ??? ???? TensorFlow KR Meetup 2016
Taehoon Kim
?
??? ?????: ??? ??? ??
??? ?????: ??? ??? ??
Haklae Kim
?
Introduction to question answering for linked data & big data
Introduction to question answering for linked data & big data
Andre Freitas
?
An Ambitious Wikidata Tutorial
An Ambitious Wikidata Tutorial
_Emw
?
Differentiable Neural Computer
Differentiable Neural Computer
Taehoon Kim
?
Summernote ??? - ????(@hackerwins)
Summernote ??? - ????(@hackerwins)
?????
?
???? ??? ?????? ????
???? ??? ?????? ????
?? ?
?
????? ??? ?? ????? ?? ?? ??? ???? TensorFlow KR Meetup 2016
????? ??? ?? ????? ?? ?? ??? ???? TensorFlow KR Meetup 2016
Taehoon Kim
?
Ad

????? ??

  • 2. ????? 2 ? ??: ???? ??? ??+?? ? ??德 ? ???? ??? 2007?~ ? ??? ???? ??? 2010?~ ? ????: Cloud, ???, PHP, ?????, HTML5
  • 3. 3 ?? ? ??????? ? ???? Q ? ???? P ? ??? ? ????
  • 4. ?????? ????… ????? ???? ???? ?? ?? ??? (??)??? ?? ??? ???? ???? ??DB 4 cf. Dbpedia, Freebase? ?? ??? machine readable, machine understandable ??? ???
  • 5. 5 ?????? ?? 2012? ?? ?? ?? ?? ???? ??? ???? ?? ? ?? ?? ?? ??? ?? ?? ???? cf. ??? ??
  • 6. ?????? ?????… ????? ???? ????, ?? ?? ???? ?? ??? ????? + ????? ????? ? ????? ????(????) ?? ? ?? Wikibase Repository? ??(?? ??) ?? ????(?: ????)?? ??? ?? ? http://wikiba.se/ 6 cf. ??? ???
  • 7. ???* ? ???? ? ????? ?? ? ????? ? ?????? ? ??????? ? ????? ?????? ???? ?? 7 ??? ? ???? ? ?????? ? ???? ? ????? ? ????? ? ??? * Multilingual. ??? ?????? ???? ??
  • 8. 8 ?? ? ?? ???? vs ????? 4.8 17.3 0 5 10 15 20 '01 '02 '03 '04 '05 '06 '07 '08 '09 '10 '11 '12 '13 '14 '15 ???(??:???) ?? ( 1? ?? ) ???? (???) ????? http://stats.wikimedia.org/EN/TablesWikipediaEN.htm http://stats.wikimedia.org/wikispecial/EN/TablesWikipediaWIKIDATA.htm
  • 9. ??? ????? ★★★★★ ??? ?? ?? ??? ?? Entity ?? + ?? + ?? ?? Item ?? ??, ??, ??, ?? ? Q?? ?? Property ??? ??, Item?? ?? P?? ?? Query ????? ??? 9 Q1 ??? 2012-10-29 P6 ??? 2013-02-04
  • 10. ?????? ?? ?? 10 1?? 2?? 3?? ? Item ??? ? ???? ?? ?? ? Property ??? ? Infobox ?? ?? ? Query ??? 2013? ???? ?? ?? ?? ? ??, ??? ?
  • 11. Item ? Q 11 ※ ????? Item??? ??? Q?? ????
  • 12. Q? ??, ??, ??, ?? ? 12 ? “??” ? “?? ?” ? ???? ? ?? ? ???: Q?? ? [[Q76]]
  • 13. ?? ?????… ??, ??, ??, ?? 13 ?? ??* Q?? ?? ?? Q?? Barack Obama Q76 love Q316 Park Geun-hye Q138048 peace Q454 The Wealth of Nations Q233562 Earth Q2 Hunminjeongeum Q18990 South Korea Q884 September 11 attacks Q10806 Hussein Onyango Obama Q15982328 Korean War Q8663 birth certificate of Barack Obama Q14527788 ? Q??? ??? ?????? ?? ???? ? Notability(?????; ???) ???? * ????? label
  • 14. ???? Q?? ?? ????? ? ? 14 http://www.wikidata.org/wiki/Special:ItemByTitle/enwiki/Barack_Obama http://www.wikidata.org/wiki/Special:ItemByTitle/kowiki/??_??? [[d:Special:ItemByTitle/enwiki/Barack_Obama]] [[d:Special:ItemByTitle/kowiki/??_???]]
  • 15. 15 http://www.wikidata.org/wiki/Q76 ★ http://www.wikidata.org/entity/Q76 http://www.wikidata.org/w/index.php?title=Q76 http://www.wikidata.org/wiki/Special:EntityData/Q76 http://www.wikidata.org/wiki/Special:EntityData/Q76.json ???? ??? [[d:Q76]] ?? [[wikidata:Q76]] { "entities":{ "Q76":{ "pageid":205, "ns":0, "title":"Q76", "lastrevid":270428856, "modified":"2015-11-10T17:03:19Z", "type":"item", "id":"Q76", "labels":{ "en":{ "language":"en", "value":"Barack Obama" }, … Q??? ?? ?? Q??? ? ?
  • 16. Q?? ?? ??? ??? 16 Q76 ?? Q76 ??? ????
  • 17. Q?? ?? ??? ??? Q? ???? 17 Q76 ?? Q76 ??? ?? alias ( a.k.a ) ?? description ?? ??? P?? ? ??? ??… ???
  • 18. 18 ?? ?? ??? label description ??? ?? Q2 Earth third planet closest to the Sun in the Solar System ?? ???? ?? ?? Q42 Douglas Adams English writer ???? ??? ??? ?? Q64 Berlin capital city and state of Ge rmany ??? ??? ?? Q80 Tim Berners-Lee Web developer ? ???? Q148 People's Republic of China state in East Asia ??????? ????? ?? (+ a.k.a. “??”) Q153 ethanol type of alcohol compound ??? Q316 love strong, positive emotion b ased on affection ?? Q405 Moon only natural satellite of Ear th ? ??? ???? Q897511 cryptanalysis science ???? Q4489310 Turing reduction 2015-11-20 ?? ? ? Q ?? ????? ???? ?? ? ??? http://www.wikidata.org/wiki/Wikidata:Tours/ko
  • 19. 19 ???? ?? Q? ??! ??·????? ???? ??? ?? ??? ??? ?? ??? ??? ??? Q ????? ????* * ???? ?? ??? ?? ????? ?????? ???
  • 20. Q??? ?? ????? 20 ? ?????? ?? ??? ? ? ???? ??? ????? ?? ? ??????? ??? + ?? ?: ?? ????? ?? ??? ???: ????, ????, ????, ???, ?????, ????? ?? ? 1? ??? ?????? ?? ? Q??? ????? AUTO INCREMENT ?? ? ??? ??? 1?? Q???? ???? ?? ?? ?? ? ?????? ????(REDIRECT) ??·?? ?? ?? ??? Barack Obama Q76 Q123 バラク? オバマ xo oo ????? ? ??? ???? ?? ( X )
  • 22. 22 P? ?? ? Item*? ?? ? Item? ????** ? ???: P?? ? [[Property:P22]] ? [[P:P22]] * ???? Entity ** P-P, Q-value ??? ??
  • 24. ??? Q, P ?? 24 Q76 Barack Obama Q138048 Park Geun-hye Q405 Moon Q6495593 Barack Obama, Sr. Q15982328 Hussein OnyangoObama Q14356 Park Chung-hee Q6784157 Park Seong-bin (P22) father (P40) child Q2 Earth Q525 Sun astronomical body (P397) child astronomical body (P398) P22 ↑ ↓ P40 P22 ↑ ↓ P40 P22 ↑ ↓ P40 P22 ↑ ↓ P40 P397 ↑ ↓ P398 P397 ↑ ↓ P398
  • 25. Q??? P?? ??? 25 Q?? ??? P?? ??? Q21 ???? P21 ?? Q22 ????? P22 ??? Q23 ?? ??? P23 (??) Q24 ? ??? P24 (??) Q25 ??? P25 ??? ? Q??? P??? ???? ? ?? ???? ?? ?? Q290 ?? P21 ?? Q7565 ??? P22 ??? Wikidata property (P1687) subject item of this property (P1629) ? Q? P? ?? ?? ??? ?? P1687 ↑ ↓ P1629 P1687 ↑ ↓ P1629 Q · P ?? ?? ?? Q · P ?? ?? ??
  • 26. P ?? ?? 26http://www.wikidata.org/wiki/Wikidata:Introduction P?? ??? P6 ?? ?? P131 ?? ?? ?? P625 ?? ?? P1082 ?? ?? ?? P25 ??? P1082 P6 P131 P131 P625 ?P? ??? ?? ? Item? ?? ?? ??? Property ??
  • 27. P ??? ??? ??????(Q62)? P 27 ?? population (P1082) ?? head of government (P6) ?? ?? ?????
  • 30. 30 ??? ? RDF, SPARQL… ??? ? ?? http://en.wikipedia.org/wiki/Semantic_Web_Stack cf. OSI 7??, ??? ?? RDF Resource Desciription Framework ? ??? ?? ??. W3C ?? ? ???? ????? ??? ?? ? ????? ???? ??? ?? SPARQL SPARQL Protocol and RDF Query Language ? RDF ??? ?? ?? ?? ? “??? ???? SQL”
  • 31. 31 RDF ?? ? Dog1 is an animal ? Cat1 is a cat ? Cats are animals ? Zoos host animals ? Zoo1 hosts the Cat2 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix ex: <http://example.org/> . @prefix zoo: <http://example.org/zoo/> . ex:dog1 rdf:type ex:animal . ex:cat1 rdf:type ex:cat . ex:cat rdfs:subClassOf ex:animal . zoo:host rdfs:range ex:animal . ex:zoo1 zoo:host ex:cat2 . http://en.wikipedia.org/wiki/RDF_Schema
  • 32. 32 SPARQL ?? PREFIX ex: <http://example.org/> SELECT ?animal WHERE { ?animal a ex:animal . } animal <http://example.org/dog1> <http://example.org/cat1> <http://example.org/cat2> SPARQL ?? ?? ?? http://en.wikipedia.org/wiki/RDF_Schema
  • 33. 33 ????? RDF ?? ?? ?? ???? ??? ??? ???? ???? ?? ????? ?? ?? ?? ??? s statement ?? v value ? q qualifier ??? r reference ???? P ?????? ???(Q42)? ???(P26)
  • 34. 34 [?? ??] references ??????(Q62)? ??(P1082) ?? ???(Q62)? ????(P569) http://ko.wikipedia.org/wiki/????:??_??? Q14527788
  • 35. 35 ????? SPARQL ?? #1 PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?politician ?cause ?politician_label ?cause_of_death_label WHERE { ?politician wdt:P106 wd:Q82955 . # find items that have "occupation (P106): politician (Q82955)" ?politician wdt:P509 ?cause . # with a P509 (cause of death) claim ?cause wdt:P279* wd:Q12078 . # ... where the cause is a subclass of (P279*) cancer (Q12078) # ?politician wdt:P39 wd:Q11696 . # Uncomment this line to include only U.S. Presidents OPTIONAL {?politician rdfs:label ?politician_label filter (lang(?politician_label) = "en") .} OPTIONAL {?cause rdfs:label ?cause_of_death_label filter (lang(?cause_of_death_label) = "en").} } ORDER BY ASC (?politician) Total results: 557, duration: 633 ms. ??? ??? ??? ?? politician cause politician_label cause_of_death_label Q1027427 Q189588 John R. Fellows stomach cancer Q1028400 Q3242950Károly Grósz kidney cancer Q10320767Q189588 Luiz Gushiken stomach cancer Q10376143Q47912 Sérgio Guerra lung cancer Q1064774 Q47912 Charles Hayes lung cancer Q10664 Q188874 Neville Chamberlain colorectal cancer Q10664 Q5526839Neville Chamberlain gastrointestinal cancer …. ??? Q: politician (Q82955), cancer (Q12078) ??? P: occupation (P106), subclass of (P279), cause of death (P509)
  • 36. 36 ????? SPARQL ?? #2 PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX p: <http://www.wikidata.org/prop/> PREFIX q: <http://www.wikidata.org/prop/qualifier/> PREFIX v: <http://www.wikidata.org/prop/statement/> SELECT DISTINCT ?city ?cityLabel ?mayor ?mayorLabel WHERE { ?city wdt:P31/wdt:P279* wd:Q515 . # find instances of subclasses of city ?city p:P6 ?statement . # with a P6 (head of goverment) statement ?statement v:P6 ?mayor . # ... that has the value ?mayor ?mayor wdt:P21 wd:Q6581072 . # ... where the ?mayor has P21 (sex or gender) female FILTER NOT EXISTS { ?statement q:P582 ?x } # ... but the statement has no P582 (end date) qualifier # Now select the population value of the ?city # (wdt: properties use only statements of "preferred" rank if any, usually meaning "current population") ?city wdt:P1082 ?population . # Optionally, find English labels for city and mayor: SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } } ORDER BY DESC(?population) LIMIT 10 Total results: 10, duration: 7180 ms. city cityLabel mayor mayorLabel Q2807 Madrid Q19592761 Manuela Carmena Q90 Paris Q2851133 Anne Hidalgo Q16555 Houston Q213847 Annise Parker Q1563 Havana Q6774124 Marta Hernández Romero Q270 Warsaw Q271902 Hanna Gronkiewicz-Waltz Q1492 Barcelona Q4779594 Ada Colau Q472 Sofia Q444718 Yordanka Fandakova Q1085 Prague Q18104657 Adriana Krná?ová Q365 Cologne Q19285371 Henriette Reker Q23197 Nashville Q16164719 Megan Barry ????? ???? ?? ? ?? ?? TOP 10 ??? Q: city (Q515), female (Q6581072) ??? P: instance of (P31), subclass of (P279), head of government (P6), sex or gender (P21), end time (P582), population (P1082)
  • 37. 37 ?????? ?? ?? ?? ???? ??? ? ??? ? ???? ??? ???… ? ??? ?? ??? ???… ? TTS, ???? ??? ???… “???? ?? ?? ?? ??.”