Professional Documents
Culture Documents
Introduction To Semantic Web Technologies & Linked Data
Introduction To Semantic Web Technologies & Linked Data
Oktie Hassanzadeh
University of Toronto
Introduction
Semantic Web Technologies
Resource Description Framework (RDF)
Querying RDF data (SPARQL)
Linked Data
Linked Data Principles
Linking Open Data Community Project
Example Applications
3
Introduction
A B C D
?
thing thing Are two documents
talking about the same
? ? thing?
? ? ?
A B C D
Based on presentations by Chris Bizer, Richard Cyganiak, Tom Heath, available at http://linkeddata.org/guides-and-tutorials
Example Query
6
Elvis Presley
1935 - 1977
Will there ever be someone like him again?
Based on presentation by Lauw, Schenkel, Suchanek, Theobald and Weikum, available at http://www.mpi-inf.mpg.de/yago-naga/CIKM10-tutorial/
Example Query
7
Another Elvis
Based on presentation by Lauw, Schenkel, Suchanek, Theobald and Weikum, available at http://www.mpi-inf.mpg.de/yago-naga/CIKM10-tutorial/
Example Query
8
Based on presentation by Lauw, Schenkel, Suchanek, Theobald and Weikum, available at http://www.mpi-inf.mpg.de/yago-naga/CIKM10-tutorial/
Example Query
9
Based on presentation by Lauw, Schenkel, Suchanek, Theobald and Weikum, available at http://www.mpi-inf.mpg.de/yago-naga/CIKM10-tutorial/
Example Query
10
A B C D
E F G
Based on presentations by Chris Bizer, Richard Cyganiak, Tom Heath, available at http://linkeddata.org/guides-and-tutorials
Introduction to
Semantic Web Technologies
Resource Description Framework (RDF)
Semantic Web Technologies
14
rdf:type
bb:renee-j-miller foaf:Person
foaf:name
Rene J. Miller
foaf:based_near
dbpedia:Toronto
Based on presentations by Chris Bizer, Richard Cyganiak, Tom Heath, available at http://linkeddata.org/guides-and-tutorials
Data Items Identified with (HTTP) URIs
18
rdf:type
bb:renee-j-miller foaf:Person
foaf:name
Rene J. Miller
foaf:based_near
dbpedia:Toronto
bb:rjmiller = http://data.bibbase.org/author/renee-j-miller/
dbpedia:Toronto = http://dbpedia.org/resource/Toronto
Based on presentations by Chris Bizer, Richard Cyganiak, Tom Heath, available at http://linkeddata.org/guides-and-tutorials
Dereferencing URIs over the Web
19
rdf:type
bb:renee-j-miller foaf:Person
foaf:name
Rene J. Miller 4,753,120
dp:populationUrban
foaf:based_near
dbpedia:Toronto
skos:subject
skos:subject
dbpedia:Ottawa dp:Cities_in_Canada
skos:subject
dbpedia:Montreal
A Simple RDF Example (in RDF/XML)
20
rdf:type
bb:renee-j-miller foaf:Person
foaf:name
Rene J. Miller
foaf:based_near
dbpedia:Toronto
<?xml
<?xml version="1.0"?>
version="1.0"?>
<rdf:RDF
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://xmlns.com/foaf/spec/#"
xmlns:foaf="http://xmlns.com/foaf/spec/#"
xmlns:bb="http://data.bibbase.org/ontology/">
xmlns:bb="http://data.bibbase.org/ontology/">
<rdf:Description
<rdf:Description rdf:about="http://.../author/renee-j-miller/">
rdf:about="http://.../author/renee-j-miller/">
<rdf:type rdf:resource="http://xmlns.com/foaf/spec/#term_Person"/>
<rdf:type rdf:resource="http://xmlns.com/foaf/spec/#term_Person"/>
<foaf:name
<foaf:name xml:lang=en">Rene
xml:lang=en">Rene J.
J. Miller</foaf:name>
Miller</foaf:name>
<foaf:based_near
<foaf:based_near rdf:resource="http://dbpedia.org/resource/Toronto"/>
rdf:resource="http://dbpedia.org/resource/Toronto "/>
</rdf:Description>
</rdf:Description>
</rdf:RDF>
</rdf:RDF>
A Simple RDF Example (in Turtle)
21
rdf:type
bb:renee-j-miller foaf:Person
foaf:name
Rene J. Miller
foaf:based_near
dbpedia:Toronto
@prefix
@prefix rdf:
rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#> ..
@prefix
@prefix foaf:
foaf: <http://xmlns.com/foaf/spec/#>
<http://xmlns.com/foaf/spec/#> ..
@prefix
@prefix bb:
bb: <http://data.bibbase.org/ontology/>
<http://data.bibbase.org/ontology/> ..
<http://data.bibbase.org/author/renee-j-miller/>
<http://data.bibbase.org/author/renee-j-miller/>
rdf:type
rdf:type foaf:person
foaf:person ..
foaf:name
foaf:name Rene
Rene J.
J. Miller@en
Miller@en ;;
foaf:based_near
foaf:based_near <<http://dbpedia.org/resource/Toronto
http://dbpedia.org/resource/Toronto>>
A Simple RDF Example (in RDFa)
22
rdf:type
bb:renee-j-miller foaf:Person
foaf:name
Rene J. Miller
foaf:based_near
dbpedia:Toronto
<p
<p about="http://.../author/renee-j-miller">The
about="http://.../author/renee-j-miller">The author
author
<span property=foaf:name lang=en>Rene J. Miller</span>
<span property=foaf:name lang=en>Rene J. Miller</span>
lives
lives in
in the
the city
city
<span
<span rel=foaf:based_near resource="http:///Toronto">Toronto</span>
rel=foaf:based_near resource="http:///Toronto">Toronto</span>
</p> .
</p> .
Based on presentation by Ivan Herman, available at http://www.w3.org/2010/Talks/0622-SemTech-IH/
Introduction to
Semantic Web Technologies
Storing & Querying RDF
Storing RDF Data
24
StmtIterator
StmtIterator iter=model.listStatements(subject,null,null);
iter=model.listStatements(subject,null,null);
while(iter.hasNext())
while(iter.hasNext()) {{
st
st == iter.next();
iter.next();
pp == st.getProperty();
st.getProperty(); oo == st.getObject();
st.getObject();
do_something(p,o);
do_something(p,o);
?p
?o
?o
?p
?o
?o
subject
subject ?p
?o
?o
?p
?o
?o
SELECT
SELECT ?p
?p ?o
?o
WHERE
WHERE {subject
{subject ?p
?p ?o}
?o}
?p
?o
?o
subject
subject ?p
?o
?o
?p
?o
?o
SELECT
SELECT ?isbn
?isbn ?price
?price ?currency
?currency ## note:
note: not
not ?x!
?x!
WHERE { ?isbn a:price ?x
WHERE { ?isbn a:price ?x . .
?x
?x rdf:value
rdf:value ?price
?price ..
?x
?x p:currency
p:currency ?currency.
?currency. }}
a:name Ghosh,
Ghosh, Amitav
Amitav
a:author a:author
http://isbn/000651409X
http://isbn/000651409X http://isbn/2020386682
http://isbn/2020386682
33
33 :
: 50
50 :
: 60
60 :
: 78
78 :$
:$
SELECT
SELECT ?isbn
?isbn ?price
?price ?currency
?currency ## note:
note: not
not ?x!
?x!
WHERE { ?isbn a:price ?x
WHERE { ?isbn a:price ?x . .
?x
?x rdf:value
rdf:value ?price
?price ..
?x
?x p:currency
p:currency ?currency.
?currency. }}
Returns: [<409X>,33,:]
a:name Ghosh,
Ghosh, Amitav
Amitav
a:author a:author
http://isbn/000651409X
http://isbn/000651409X http://isbn/2020386682
http://isbn/2020386682
33
33 :
: 50
50 :
: 60
60 :
: 78
78 :$
:$
SELECT
SELECT ?isbn
?isbn ?price
?price ?currency
?currency ## note:
note: not
not ?x!
?x!
WHERE { ?isbn a:price ?x
WHERE { ?isbn a:price ?x . .
?x
?x rdf:value
rdf:value ?price
?price ..
?x
?x p:currency
p:currency ?currency.
?currency. }}
a:author a:author
http://isbn/000651409X
http://isbn/000651409X http://isbn/2020386682
http://isbn/2020386682
33
33 :
: 50
50 :
: 60
60 :
: 78
78 :$
:$
SELECT
SELECT ?isbn
?isbn ?price
?price ?currency
?currency ## note:
note: not
not ?x!
?x!
WHERE { ?isbn a:price ?x
WHERE { ?isbn a:price ?x . .
?x
?x rdf:value
rdf:value ?price
?price ..
?x
?x p:currency
p:currency ?currency.
?currency. }}
a:author a:author
http://isbn/000651409X
http://isbn/000651409X http://isbn/2020386682
http://isbn/2020386682
33
33 :
: 50
50 :
: 60
60 :
: 78
78 :$
:$
SELECT
SELECT ?isbn
?isbn ?price
?price ?currency
?currency ## note:
note: not
not ?x!
?x!
WHERE { ?isbn a:price ?x
WHERE { ?isbn a:price ?x . .
?x
?x rdf:value
rdf:value ?price
?price ..
?x
?x p:currency
p:currency ?currency.
?currency. }}
a:author a:author
http://isbn/000651409X
http://isbn/000651409X http://isbn/2020386682
http://isbn/2020386682
33
33 :
: 50
50 :
: 60
60 :
: 78
78 :$
:$
SELECT
SELECT ?isbn
?isbn ?price
?price ?currency
?currency ## note:
note: not
not ?x!
?x!
WHERE { ?isbn a:price ?x
WHERE { ?isbn a:price ?x . .
?x
?x rdf:value
rdf:value ?price
?price ..
?x
?x p:currency
p:currency ?currency.
?currency.
FILTER(?currency
FILTER(?currency ==
== :)
:) }}
a:author a:author
http://isbn/000651409X
http://isbn/000651409X http://isbn/2020386682
http://isbn/2020386682
33
33 :
: 50
50 :
: 60
60 :
: 78
78 :$
:$
query results
In SPARQL 1.1: updating data, not only query
Application
SPARQL Endpoint
SPARQL Endpoint
NLP Techniques
GR
RDF
Fa
DD
RD
L,
SQL
RDF
a
RDF Graph Relational
Database
Based on presentations by Chris Bizer, Richard Cyganiak, Tom Heath, available at http://linkeddata.org/guides-and-tutorials
Principles of Linked Data
41
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
LOD Cloud August 2007
45
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
LOD Cloud November 2007
46
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
LOD Cloud September 2008
47
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
LOD Cloud March 2009
48
Overall Statistics
Triples #: 7.7 billion
Links (external) #: 142 million
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
LOD Cloud September 2010
49
Overall Statistics
Triples #: ~25 billion
Links (external) #: ~440 million
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
Properties of Web of Linked Data
50
Based on presentations by Chris Bizer, Richard Cyganiak, Tom Heath, available at http://linkeddata.org/guides-and-tutorials
Linked Data
Sean Penn
Penn
U Penn
? University of
Pennsylvania
Pennsylvania
Penn State State University
PSU Pennsylvania
(US State)
Passenger
Service Unit
Based on presentation by Lauw, Schenkel, Suchanek, Theobald and Weikum, available at http://www.mpi-inf.mpg.de/yago-naga/CIKM10-tutorial/
DBpedia Data
55
Example App: DBpedia Mobile
56
Figures from: Christian Becker, Christian Bizer: DBpedia Mobile: A Location-Enabled Linked Data Browser. LDOW 2008
DBpedia RelFinder http://relfinder.dbpedia.org/
57
Freebase snapshot
Freebase Data
60
Freebase Data
61
Freebase Applications
62
Popular Freebase Apps
63
Automatically-
generated quiz
about your favorite
actor or actress
Web application built
in less than 10 KB
Uses LinkedMDBs data
via SPARQL
Try it out:
http://10k.aneventapart.com/
Uploads/310/
Linked Clinical Trials
66
Part of the Linking Open Drug Data Project under W3Cs Health Care
and Life Sciences (HCLS) task force
Won the first prize at Triplification Challenge
I-Semantics Conference, October 2009
LinkedCT data http://linkedct.org
Published by D2R Server
from ClinicalTrials.gov data
Online registry of clinical trials conducted in the United States and around the
world
Published in XML
Links to several external sources about drugs, diseases, locations, etc.
Actively working with domain experts (W3Cs HCLS members) on
increasing the quality of the data and the links based on real use cases
See: Enabling Tailored Therapeutics with Linked Data By A. Jentzsch et al. at LDOW2010
BibBase
67
Goals
Makes it easy for scientists and research groups to maintain
publications pages
Users maintain a BibTeX file; BibBase does the rest
Publishes a good-looking custom HTML page
Publishes the data in RDF, with a SPARQL endpoint
Links entries to the open linked data cloud on-the-fly
Browsing
E.g., Marbles and DBpedia Mobile
Searching
Falcons
Mashups and more
Revyu, BBC Music, Pipe
Enterprise analytics
Browsing Linked Data
76
Based on presentations by Chris Bizer, Richard Cyganiak, Tom Heath, available at http://linkeddata.org/guides-and-tutorials
Marbles
77
Based on presentations by Chris Bizer, Richard Cyganiak, Tom Heath, available at http://linkeddata.org/guides-and-tutorials
78
79
Based on presentations by Chris Bizer, Richard Cyganiak, Tom Heath, available at http://linkeddata.org/guides-and-tutorials
DERI Semantic Web Mashup
80
Based on presentations by Chris Bizer, Richard Cyganiak, Tom Heath, available at http://linkeddata.org/guides-and-tutorials
Yahoo!, Google & Facebook
81
Based on presentations by Chris Bizer, Richard Cyganiak, Tom Heath, available at http://linkeddata.org/guides-and-tutorials
Linked Open Data in IBMs Watson?
82
http://linkeddata.org