introduction to semantic web technologies ivan herman, w3c june 22 nd , 2010
DESCRIPTION
Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010. The Music site of the BBC. The Music site of the BBC. How to build such a site 1. Site editors roam the Web for new facts may discover further links while roaming They update the site manually - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/1.jpg)
Introduction to Semantic Web TechnologiesIvan Herman, W3C
June 22nd, 2010
![Page 4: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/4.jpg)
4
How to build such a site 1. Site editors roam the Web for new facts
may discover further links while roaming They update the site manually And the site gets soon out-of-date
![Page 5: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/5.jpg)
5
How to build such a site 2. Editors roam the Web for new data
published on Web sites “Scrape” the sites with a program to
extract the information ie, write some code to incorporate the new
data Easily get out of date again…
![Page 6: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/6.jpg)
6
How to build such a site 3. Editors roam the Web for new data via
API-s Understand those…
input, output arguments, datatypes used, etc Write some code to incorporate the new
data Easily get out of date again…
![Page 7: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/7.jpg)
7
The choice of the BBC Use external, public datasets
Wikipedia, MusicBrainz, … They are available as data
not API-s or hidden on a Web site data can be extracted using, eg, HTTP
requests or standard queries
![Page 8: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/8.jpg)
8
In short… Use the Web of Data as a Content
Management System Use the community at large as content
editors
![Page 9: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/9.jpg)
9
And this is no secret…
![Page 10: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/10.jpg)
10
Data on the Web There are more an more data on the Web
government data, health related data, general knowledge, company information, flight information, restaurants,…
More and more applications rely on the availability of that data
![Page 11: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/11.jpg)
11
But… data are often in isolation, “silos”
Photo credit Alex (ajagendorf25), Flickr
![Page 12: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/12.jpg)
12
Imagine… A “Web” where
documents are available for download on the Internet
but there would be no hyperlinks among them
![Page 13: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/13.jpg)
13
And the problem is real…
![Page 14: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/14.jpg)
14
Data on the Web is not enough… We need a proper infrastructure for a real
Web of Data data is available on the Web
accessible via standard Web technologies data are interlinked over the Web ie, data can be integrated over the Web
This is where Semantic Web technologies come in
![Page 15: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/15.jpg)
15
A Web of Data unleashes now applications
![Page 16: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/16.jpg)
16
A nice usage of UK government data
![Page 17: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/17.jpg)
17
In what follows… We will use a simplistic example to
introduce the main Semantic Web concepts
![Page 18: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/18.jpg)
18
The rough structure of data integration Map the various data onto an abstract
data representation make the data independent of its internal
representation… Merge the resulting representations Start making queries on the whole!
queries not possible on the individual data sets
![Page 19: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/19.jpg)
19
We start with a book...
![Page 20: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/20.jpg)
20
A simplified bookstore data (dataset “A”)
ID Author
Title Publisher Year
ISBN 0-00-6511409-X id_xyz The Glass Palace
id_qpr 2000
ID Name Homepageid_xyz Ghosh, Amitav http://
www.amitavghosh.com
ID Publisher’s name
City
id_qpr Harper Collins London
![Page 21: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/21.jpg)
21
1st: export your data as a set of relations
http://…isbn/000651409X
Ghosh, Amitav http://www.amitavghosh.com
The Glass Palace
2000
London
Harper Collins
a:title
a:year
a:city
a:p_name
a:name a:homepage
a:authora:publisher
![Page 22: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/22.jpg)
22
Some notes on the exporting the data Relations form a graph
the nodes refer to the “real” data or contain some literal
how the graph is represented in machine is immaterial for now
![Page 23: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/23.jpg)
23
Some notes on the exporting the data Data export does not necessarily mean
physical conversion of the data relations can be generated on-the-fly at query
time via SQL “bridges” scraping HTML pages extracting data from Excel sheets etc.
One can export part of the data
![Page 24: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/24.jpg)
24
Same book in French…
![Page 25: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/25.jpg)
25
Another bookstore data (dataset “F”)
A B C D
1 ID Titre Traducteur
Original
2 ISBN 2020286682 Le Palais des Miroirs
$A12$ ISBN 0-00-6511409-X
3
4
5
6 ID Auteur7 ISBN 0-00-6511409-
X$A11$
8
9
10 Nom11 Ghosh, Amitav12 Besse, Christianne
![Page 26: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/26.jpg)
26
2nd: export your second set of datahttp://…isbn/000651409X
Ghosh, Amitav
Besse, Christianne
Le palais des miroirsf:original
f:nom
f:traducteur
f:auteurf:tit
re
http://…isbn/2020386682
f:nom
![Page 27: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/27.jpg)
27
3rd: start merging your data
http://…isbn/000651409X
Ghosh, Amitav
Besse, Christianne
Le palais des miroirs
f:original
f:nom
f:traducteur
f:auteur f:titre
http://…isbn/2020386682
f:nom
http://…isbn/000651409X
Ghosh, Amitavhttp://www.amitavghosh.com
The Glass Palace
2000
London
Harper Collins
a:title
a:year
a:city
a:p_name
a:namea:homepage
a:author
a:publisher
![Page 28: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/28.jpg)
28
3rd: start merging your data (cont)
http://…isbn/000651409X
Ghosh, Amitav
Besse, Christianne
Le palais des miroirs
f:original
f:nom
f:traducteur
f:auteur f:titre
http://…isbn/2020386682
f:nom
http://…isbn/000651409X
Ghosh, Amitavhttp://www.amitavghosh.com
The Glass Palace
2000
London
Harper Collins
a:title
a:year
a:city
a:p_name
a:namea:homepage
a:author
a:publisher
Same URI!
![Page 29: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/29.jpg)
29
3rd: start merging your dataa:title
Ghosh, Amitav
Besse, Christianne
Le palais des miroirs
f:original
f:nom
f:traducteur
f:auteur
f:titre
http://…isbn/2020386682
f:nom
Ghosh, Amitavhttp://www.amitavghosh.com
The Glass Palace
2000
London
Harper Collins
a:year
a:city
a:p_name
a:namea:homepage
a:author
a:publisher
http://…isbn/000651409X
![Page 30: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/30.jpg)
30
Start making queries… User of data “F” can now ask queries like:
“give me the title of the original” well, … « donnes-moi le titre de l’original »
This information is not in the dataset “F”…
…but can be retrieved by merging with dataset “A”!
![Page 31: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/31.jpg)
31
However, more can be achieved… We “feel” that a:author and f:auteur should
be the same But an automatic merge doest not know that! Let us add some extra information to the
merged data: a:author same as f:auteur both identify a “Person” a term that a community may have already
defined: a “Person” is uniquely identified by his/her name and,
say, homepage it can be used as a “category” for certain type of
resources
![Page 32: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/32.jpg)
32
3rd revisited: use the extra knowledge
Besse, Christianne
Le palais des miroirsf:original
f:nom
f:traducteur
f:auteur
f:titre
http://…isbn/2020386682
f:nom
Ghosh, Amitavhttp://www.amitavghosh.com
The Glass Palace
2000
London
Harper Collins
a:title
a:year
a:city
a:p_name
a:namea:homepage
a:author
a:publisher
http://…isbn/000651409X
http://…foaf/Personr:type
r:type
![Page 33: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/33.jpg)
33
Start making richer queries! User of dataset “F” can now query:
“donnes-moi la page d’accueil de l’auteur de l’original” well… “give me the home page of the original’s
‘auteur’” The information is not in datasets “F” or
“A”… …but was made available by:
merging datasets “A” and datasets “F” adding three simple extra statements as an
extra “glue”
![Page 34: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/34.jpg)
34
Combine with different datasets Using, e.g., the “Person”, the dataset can
be combined with other sources For example, data in Wikipedia can be
extracted using dedicated tools e.g., the “dbpedia” project can extract the
“infobox” information from Wikipedia already…
![Page 35: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/35.jpg)
35
Merge with Wikipedia data
Besse, Christianne
Le palais des miroirsf:original
f:nom
f:traducteur
f:auteur
f:titre
http://…isbn/2020386682
f:nom
Ghosh, Amitav http://www.amitavghosh.com
The Glass Palace
2000
London
Harper Collins
a:title
a:year
a:city
a:p_name
a:namea:homepage
a:author
a:publisher
http://…isbn/000651409X
http://…foaf/Personr:type
r:type
http://dbpedia.org/../Amitav_Ghosh
r:type
foaf:name w:reference
![Page 36: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/36.jpg)
36
Merge with Wikipedia data
Besse, Christianne
Le palais des miroirsf:original
f:nom
f:traducteur
f:auteur
f:titre
http://…isbn/2020386682
f:nom
Ghosh, Amitav http://www.amitavghosh.com
The Glass Palace
2000
London
Harper Collins
a:title
a:year
a:city
a:p_name
a:namea:homepage
a:author
a:publisher
http://…isbn/000651409X
http://…foaf/Personr:type
r:type
http://dbpedia.org/../Amitav_Ghosh
http://dbpedia.org/../The_Hungry_Tide
http://dbpedia.org/../The_Calcutta_Chromosome
http://dbpedia.org/../The_Glass_Palace
r:type
foaf:name w:reference
w:author_of
w:author_of
w:author_of
w:isbn
![Page 37: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/37.jpg)
37
Merge with Wikipedia data
Besse, Christianne
Le palais des miroirsf:original
f:nom
f:traducteur
f:auteur
f:titre
http://…isbn/2020386682
f:nom
Ghosh, Amitav http://www.amitavghosh.com
The Glass Palace
2000
London
Harper Collins
a:title
a:year
a:city
a:p_name
a:namea:homepage
a:author
a:publisher
http://…isbn/000651409X
http://…foaf/Personr:type
r:type
http://dbpedia.org/../Amitav_Ghosh
http://dbpedia.org/../The_Hungry_Tide
http://dbpedia.org/../The_Calcutta_Chromosome
http://dbpedia.org/../Kolkata
http://dbpedia.org/../The_Glass_Palace
r:type
foaf:name w:reference
w:author_of
w:author_of
w:author_of
w:born_in
w:isbn
w:long w:lat
![Page 38: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/38.jpg)
38
Is that surprising? It may look like it but, in fact, it should
not be… What happened via automatic means is
done every day by Web users! The difference: a bit of extra rigour so
that machines could do this, too
![Page 39: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/39.jpg)
39
It could become even more powerful We could add extra knowledge to the merged
datasets e.g., a full classification of various types of library
data geographical information etc.
This is where ontologies, extra rules, etc, come in ontologies/rule sets can be relatively simple and
small, or huge, or anything in between… Even more powerful queries can be asked as a
result
![Page 40: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/40.jpg)
40
What did we do?
Data in various formats
Data represented in abstract format
Applications
Map,Expose,…
ManipulateQuery…
![Page 41: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/41.jpg)
41
So where is the Semantic Web? The Semantic Web provides technologies
to make such integration possible! Hopefully you get a full picture at the end
of the tutorial…
![Page 42: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/42.jpg)
42
The Basis: RDF
![Page 43: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/43.jpg)
43
RDF triples Let us begin to formalize what we did!
we “connected” the data… but a simple connection is not enough… data
should be named somehow hence the RDF Triples: a labelled connection
between two resources
![Page 44: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/44.jpg)
44
RDF triples (cont.) An RDF Triple (s,p,o) is such that:
“s”, “p” are URI-s, ie, resources on the Web; “o” is a URI or a literal “s”, “p”, and “o” stand for “subject”, “property”, and
“object” here is the complete triple:
(<http://…isbn…6682>, <http://…/original>, <http://…isbn…409X>)
RDF is a general model for such tripleswith machine readable formats like
RDF/XML, Turtle, N3, RDFa, …
![Page 45: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/45.jpg)
45
RDF triples (cont.) Resources can use any URI
http://www.example.org/file.html#home http://www.example.org/file2.xml#xpath(//
q[@a=b]) http://www.example.org/form?a=b&c=d
RDF triples form a directed, labeled graph (the best way to think about them!)
![Page 46: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/46.jpg)
46
A simple RDF example (in RDF/XML)
<rdf:Description rdf:about="http://…/isbn/2020386682"> <f:titre xml:lang="fr">Le palais des mirroirs</f:titre> <f:original rdf:resource="http://…/isbn/000651409X"/></rdf:Description>
(Note: namespaces are used to simplify the URI-s)
f:originalf:titre
http://…isbn/2020386682
Le palais des miroirs http://…isbn/000651409X
![Page 47: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/47.jpg)
47
A simple RDF example (in Turtle)
<http://…/isbn/2020386682> f:titre "Le palais des mirroirs"@fr ; f:original <http://…/isbn/000651409X> .
f:originalf:titre
http://…isbn/2020386682
Le palais des miroirs http://…isbn/000651409X
![Page 48: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/48.jpg)
48
A simple RDF example (in RDFa)
<p about="http://…/isbn/2020386682">The book entitled“<span property="f:title" lang="fr">Le palais des mirroirs</span>” is the French translation of the “<span rel="f:original" resource="http://…/isbn/000651409X">GlassPalace</span>”</p> .
f:originalf:titre
http://…isbn/2020386682
Le palais des miroirs http://…isbn/000651409X
![Page 49: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/49.jpg)
49
“Internal” nodes Consider the following statement:
“the publisher is a «thing» that has a name and an address”
Until now, nodes were identified with a URI. But…
…what is the URI of «thing»?
London
Harper Collins
a:city
a:p_namea:publisher
http://…isbn/000651409X
![Page 50: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/50.jpg)
50
One solution: create an extra URI The resource will be “visible” on the Web
care should be taken to define unique URI-s
<rdf:Description rdf:about="http://…/isbn/000651409X"> <a:publisher rdf:resource="urn:uuid:f60ffb40-307d-…"/></rdf:Description><rdf:Description rdf:about="urn:uuid:f60ffb40-307d-…"> <a:p_name>HarpersCollins</a:p_name> <a:city>HarpersCollins</a:city></rdf:Description>
![Page 51: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/51.jpg)
51
Internal identifier (“blank nodes”)<rdf:Description rdf:about="http://…/isbn/000651409X"> <a:publisher rdf:nodeID="A234"/></rdf:Description><rdf:Description rdf:nodeID="A234"> <a:p_name>HarpersCollins</a:p_name> <a:city>HarpersCollins</a:city></rdf:Description>
<http://…/isbn/2020386682> a:publisher _:A234._:A234 a:p_name "HarpersCollins".
Internal = these resources are not visible outside
London
Harper Collins
a:city
a:p_namea:publisher
http://…isbn/000651409X
![Page 52: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/52.jpg)
52
Blank nodes: the system can do it Let the system create a “nodeID”
internally (you do not really care about the name…)
<http://…/isbn/000651409X> a:publisher [ a:p_name "HarpersCollins"; …].
London
Harper Collins
a:city
a:p_namea:publisher
http://…isbn/000651409X
![Page 53: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/53.jpg)
53
Blank nodes when merging Blank nodes require attention when
merging blanks nodes with identical nodeID-s in
different graphs are different implementations must be careful…
![Page 54: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/54.jpg)
54
RDF in programming practice For example, using Java+Jena (HP’s Bristol
Lab): a “Model” object is created the RDF file is parsed and results stored in the
Model the Model offers methods to retrieve:
triples (property,object) pairs for a specific subject (subject,property) pairs for specific object etc.
the rest is conventional programming… Similar tools exist in Python, PHP, etc.
![Page 55: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/55.jpg)
55
Jena example // create a model Model model=new ModelMem(); Resource subject=model.createResource("URI_of_Subject") // 'in' refers to the input file model.read(new InputStreamReader(in)); StmtIterator iter=model.listStatements(subject,null,null); while(iter.hasNext()) { st = iter.next(); p = st.getProperty(); o = st.getObject(); do_something(p,o); }
![Page 56: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/56.jpg)
56
Merge in practice Environments merge graphs
automatically e.g., in Jena, the Model can load several files the load merges the new statements
automatically merge takes care of blank node issues, too
![Page 57: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/57.jpg)
57
Another relatively simple application Goal: reuse of older
experimental data Keep data in
databases or XML, just export key “fact” as RDF
Use a faceted browser to visualize and interact with the result
Courtesy of Nigel Wilkinson, Lee Harland, Pfizer Ltd, Melliyal Annamalai, Oracle (SWEO Case Study)
![Page 58: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/58.jpg)
58
One level higher up(RDFS, Datatypes)
![Page 59: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/59.jpg)
59
Need for RDF schemas First step towards the “extra knowledge”:
define the terms we can use what restrictions apply what extra relationships are there?
Officially: “RDF Vocabulary Description Language” the term “Schema” is retained for historical
reasons…
![Page 60: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/60.jpg)
60
Classes, resources, … Think of well known traditional
vocabularies: use the term “novel” “every novel is a fiction” “«The Glass Palace» is a novel” etc.
RDFS defines resources and classes: everything in RDF is a “resource” “classes” are also resources, but… …they are also a collection of possible
resources (i.e., “individuals”) “fiction”, “novel”, …
![Page 61: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/61.jpg)
61
Classes, resources, … (cont.) Relationships are defined among
resources: “typing”: an individual belongs to a specific
class “«The Glass Palace» is a novel” to be more precise: “«http://.../000651409X» is a
novel” “subclassing”: all instances of one are also
the instances of the other (“every novel is a fiction”)
RDFS formalizes these notions in RDF
![Page 62: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/62.jpg)
62
Classes, resources in RDF(S)
RDFS defines the meaning of these terms (these are all special URI-s, we just use the
namespace abbreviation)
rdf:type#Novelhttp://…isbn/000651409X
rdfs:Class
rdf:type
![Page 63: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/63.jpg)
63
Inferred properties
is not in the original RDF data… …but can be inferred from the RDFS rules RDFS environments return that triple, too
(<http://…/isbn/000651409X> rdf:type #Fiction)
rdf:type#Novelhttp://…isbn/000651409X
#Fiction
rdf:subClassOf
rdf:type
![Page 64: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/64.jpg)
64
Inference: let us be formal… The RDF Semantics document has a list
of (33) entailment rules: “if such and such triples are in the graph, add
this and this” do that recursively until the graph does not
change The relevant rule for our example:
If: uuu rdfs:subClassOf xxx . vvv rdf:type uuu .Then add: vvv rdf:type xxx .
![Page 65: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/65.jpg)
65
Properties Property is a special class (rdf:Property)
properties are also resources identified by URI-s
There is also a possibility for a “sub-property” all resources bound by the “sub” are also
bound by the other Range and domain of properties can be
specified i.e., what type of resources serve as object
and subject
![Page 66: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/66.jpg)
66
Example for property characterization
:title rdf:type rdf:Property; rdfs:domain :Fiction; rdfs:range rdfs:Literal.
![Page 67: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/67.jpg)
67
What does this mean? Again, new relations can be deduced. Indeed, if
:title rdf:type rdf:Property; rdfs:domain :Fiction; rdfs:range rdfs:Literal.
<http://…/isbn/000651409X> :title "The Glass Palace" .
<http://…/isbn/000651409X> rdf:type :Fiction .
then the system can infer that:
![Page 68: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/68.jpg)
68
Literals Literals may have a data type
floats, integers, booleans, etc, defined in XML Schemas
full XML fragments (Natural) language can also be specified
![Page 69: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/69.jpg)
69
Examples for datatypes
<http://…/isbn/000651409X> :page_number "543"^^xsd:integer ; :publ_date "2000"^^xsd:gYear ; :price "6.99"^^xsd:float .
![Page 70: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/70.jpg)
70
A bit of RDFS can take you far… Remember the power of merge? We could have used, in our example:
f:auteur is a subproperty of a:author and vice versa(although we will see other ways to do that…)
Of course, in some cases, more complex knowledge is necessary (see later…)
![Page 71: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/71.jpg)
71
Find the right experts at NASA Expertise locater for nearly 70,000 NASA
civil servants, integrate 6 or 7 geographically distributed
databases, …
Michael Grove, Clark & Parsia, LLC, and Andrew Schain, NASA, (SWEO Case Study)
![Page 72: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/72.jpg)
72
How to get and create RDF Data?
![Page 73: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/73.jpg)
73
Simple approach Write RDF/XML, RDFa, or Turtle
“manually” In some cases that is necessary, but it
really does not scale…
![Page 74: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/74.jpg)
74
RDF with XHTML Obviously, a huge source of information By adding some “meta” information, the
same source can be reused for, eg, data integration, better mashups, etc typical example: your personal information,
like address, should be readable for humans and processable by machines
![Page 75: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/75.jpg)
75
RDF with XML/(X)HTML (cont) Two solutions have emerged:
use microformats and convert the content into RDF XSLT is the favorite approach
add RDF-like statements directly into XHTML via RDFa
![Page 76: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/76.jpg)
76
Bridge to relational databases Data on the Web are mostly stored in
databases “Bridges” are being defined:
a layer between RDF and the relational data RDB tables are “mapped” to RDF graphs, possibly
on the fly different mapping approaches are being used
a number RDB systems offer this facility already (eg, Oracle, OpenLink, …)
W3C is working on a standard in this area
![Page 77: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/77.jpg)
77
Linked Open Data
![Page 78: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/78.jpg)
78
Linked Open Data Project Goal: “expose” open datasets in RDF Set RDF links among the data items from
different datasets Set up, if possible, query endpoints
![Page 79: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/79.jpg)
79
Example data source: DBpedia DBpedia is a community effort to
extract structured (“infobox”) information from Wikipedia
provide a query endpoint to the dataset interlink the DBpedia dataset with other
datasets on the Web
![Page 80: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/80.jpg)
80
Extracting structured data from Wikipedia@prefix dbpedia <http://dbpedia.org/resource/>.@prefix dbterm <http://dbpedia.org/property/>.
dbpedia:Amsterdam dbterm:officialName "Amsterdam" ; dbterm:longd "4” ; dbterm:longm "53" ; dbterm:longs "32” ; dbterm:leaderName dbpedia:Lodewijk_Asscher ; ... dbterm:areaTotalKm "219" ; ...dbpedia:ABN_AMRO dbterm:location dbpedia:Amsterdam ; ...
![Page 81: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/81.jpg)
81
Automatic links among open datasets<http://dbpedia.org/resource/Amsterdam> owl:sameAs <http://rdf.freebase.com/ns/...> ; owl:sameAs <http://sws.geonames.org/2759793> ; ...
<http://sws.geonames.org/2759793> owl:sameAs <http://dbpedia.org/resource/Amsterdam> wgs84_pos:lat "52.3666667" ; wgs84_pos:long "4.8833333"; geo:inCountry <http://www.geonames.org/countries/#NL> ; ...
Processors can switch automatically from one to the other…
![Page 82: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/82.jpg)
82
The LOD “cloud”, June 2009
![Page 83: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/83.jpg)
83
Remember the BBC example?
![Page 84: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/84.jpg)
84
NYT articles on university alumni
![Page 85: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/85.jpg)
85
Query RDF Data(SPARQL)
![Page 86: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/86.jpg)
86
Querying RDF graphs Remember the Jena idiom:
StmtIterator iter=model.listStatements(subject,null,null);while(iter.hasNext()) { st = iter.next(); p = st.getProperty(); o = st.getObject(); do_something(p,o);
In practice, more complex queries into the RDF data are necessary
something like “give me (a,b) pairs for which there is an x such that (x parent a) and (b brother x) holds” (ie, return the uncles)
The goal of SPARQL (Query Language for RDF)
![Page 87: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/87.jpg)
87
Analyze the Jena exampleStmtIterator iter=model.listStatements(subject,null,null);while(iter.hasNext()) { st = iter.next(); p = st.getProperty(); o = st.getObject(); do_something(p,o);
subject
?o
?o
?o
?o
?p
?p
?p
?p
![Page 88: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/88.jpg)
88
General: graph patterns The fundamental idea: use graph
patterns the pattern contains unbound symbols by binding the symbols, subgraphs of the RDF
graph are selected if there is such a selection, the query returns
bound resources
![Page 89: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/89.jpg)
89
Our Jena example in SPARQL
The triples in WHERE define the graph pattern, with ?p and ?o “unbound” symbols
The query returns all p,o pairs
SELECT ?p ?oWHERE {subject ?p ?o}
subject
?o
?o
?o
?o
?p
?p
?p
?p
![Page 90: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/90.jpg)
90
Simple SPARQL exampleSELECT ?isbn ?price ?currency # note: not ?x!WHERE {?isbn a:price ?x. ?x rdf:value ?price. ?x p:currency ?currency.}
a:name
http://…isbn/2020386682http://…isbn/000651409X
:£33
p:currencyrdf:value
:€50
p:currencyrdf:value
:€60
p:currencyrdf:value
:$78
p:currencyrdf:value
Ghosh, Amitav
a:pricea:price a:pricea:price
a:authora:author
![Page 91: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/91.jpg)
91
Simple SPARQL exampleSELECT ?isbn ?price ?currency # note: not ?x!WHERE {?isbn a:price ?x. ?x rdf:value ?price. ?x p:currency ?currency.}
a:name
http://…isbn/2020386682http://…isbn/000651409X
:£33
p:currencyrdf:value
:€50
p:currencyrdf:value
:€60
p:currencyrdf:value
:$78
p:currencyrdf:value
Ghosh, Amitav
a:pricea:price a:pricea:price
a:authora:author
Returns: [<…409X>,33,:£]
![Page 92: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/92.jpg)
92
Simple SPARQL exampleSELECT ?isbn ?price ?currency # note: not ?x!WHERE {?isbn a:price ?x. ?x rdf:value ?price. ?x p:currency ?currency.}
a:name
http://…isbn/2020386682http://…isbn/000651409X
:£33
p:currencyrdf:value
:€50
p:currencyrdf:value
:€60
p:currencyrdf:value
:$78
p:currencyrdf:value
Ghosh, Amitav
a:pricea:price a:pricea:price
a:authora:author
Returns: [<…409X>,33,:£], [<…409X>,50,:€]
![Page 93: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/93.jpg)
93
Simple SPARQL exampleSELECT ?isbn ?price ?currency # note: not ?x!WHERE {?isbn a:price ?x. ?x rdf:value ?price. ?x p:currency ?currency.}
a:name
http://…isbn/2020386682http://…isbn/000651409X
:£33
p:currencyrdf:value
:€50
p:currencyrdf:value
:€60
p:currencyrdf:value
:$78
p:currencyrdf:value
Ghosh, Amitav
a:pricea:price a:pricea:price
a:authora:author
Returns: [<…409X>,33,:£], [<…409X>,50,:€], [<…6682>,60,:€]
![Page 94: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/94.jpg)
94
Simple SPARQL exampleSELECT ?isbn ?price ?currency # note: not ?x!WHERE {?isbn a:price ?x. ?x rdf:value ?price. ?x p:currency ?currency.}
a:name
http://…isbn/2020386682http://…isbn/000651409X
:£33
p:currencyrdf:value
:€50
p:currencyrdf:value
:€60
p:currencyrdf:value
:$78
p:currencyrdf:value
Ghosh, Amitav
a:pricea:price a:pricea:price
a:authora:author
Returns: [<…409X>,33,:£], [<…409X>,50,:€], [<…6682>,60,:€], [<…6682>,78,:$]
![Page 95: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/95.jpg)
95
Pattern constraintsSELECT ?isbn ?price ?currency # note: not ?x!WHERE { ?isbn a:price ?x. ?x rdf:value ?price. ?x p:currency ?currency. FILTER(?currency == :€) }
a:name
http://…isbn/2020386682http://…isbn/000651409X
:£33
p:currencyrdf:value
:€50
p:currencyrdf:value
:€60
p:currencyrdf:value
:$78
p:currencyrdf:value
Ghosh, Amitav
a:pricea:price a:pricea:price
a:authora:author
Returns: [<…409X>,50,:€], [<…6682>,60,:€]
![Page 96: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/96.jpg)
96
Many extra SPARQL features Limit the number of returned results;
remove duplicates, sort them, … Optional branches: if some part of the
pattern does not match, ignore it Specify several data sources (via URI-s)
within the query (essentially, a merge on-the-fly!)
Construct a graph using a separate pattern on the query results
In SPARQL 1.1: updating data, not only query
![Page 97: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/97.jpg)
97
SPARQL usage in practice SPARQL is usually used over the network
separate documents define the protocol and the result format SPARQL Protocol for RDF with HTTP and SOAP
bindings SPARQL results in XML or JSON formats
Big datasets often offer “SPARQL endpoints” using this protocol typical example: SPARQL endpoint to DBpedia
![Page 98: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/98.jpg)
98
SPARQL as a unifying point
SPARQL Processor
HTML Unstructured Text XML/XHTML
RelationalDatabase
SQL
RD
F
DatabaseSPA
RQ
L En
dpoi
nt
Triple store SPA
RQ
L En
dpoi
nt
RDF Graph
Application
RDFa
GRDDL, RDFa
NLP
Tec
hniq
ues
SPARQL Construct SPARQL Construct
![Page 99: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/99.jpg)
99
Integrate knowledge for Chinese Medicine
Courtesy of Huajun Chen, Zhejiang University, (SWEO Case Study)
Integration of a large number of TCM databases
around 80 databases, around 200,000 records each
![Page 100: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/100.jpg)
100
Vocabularies
![Page 101: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/101.jpg)
101
Vocabularies Data integration needs agreements on
terms “translator”, “author”
categories used “Person”, “literature”
relationships among those “an author is also a Person…”, “historical fiction is
a narrower term than fiction” ie, new relationships can be deduced
![Page 102: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/102.jpg)
102
Vocabularies There is a need for “languages” to define
such vocabularies to define those vocabularies to assign clear “semantics” on how new
relationships can be deduced
![Page 103: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/103.jpg)
103
But what about RDFS? Indeed RDFS is such framework:
there is typing, subtyping properties can be put in a hierarchy datatypes can be defined
RDFS is enough for many vocabularies But not for all!
![Page 104: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/104.jpg)
104
Three technologies have emerged To re-use thesauri, glossaries, etc: SKOS To define more complex vocabularies
with a strong logical underpinning: OWL Generic framework to define rules on
terms and data: RIF
![Page 105: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/105.jpg)
105
Using thesauri, glossaries(SKOS)
![Page 106: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/106.jpg)
106
SKOS Represent and share classifications,
glossaries, thesauri, etc for example:
Dewey Decimal Classification, Art and Architecture Thesaurus, ACM classification of keywords and terms…
classification/formalization of Web 2.0 type tags Define classes and properties to add
those structures to an RDF universe allow for a quick port of this traditional data,
combine it with other data
![Page 107: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/107.jpg)
107
Example: the term “Fiction”, as defined by the Library of Congress
![Page 108: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/108.jpg)
108
Example: the term “Fiction”, as defined by the Library of Congress
![Page 109: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/109.jpg)
109
Thesauri have identical structures… The structure of the LOC page is fairly
typical label, alternate label, narrower, broader, … there is even an ISO standard for such
structures SKOS provides a basic structure to create
an RDF representation of these
![Page 110: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/110.jpg)
110
LOC’s “Fiction” in SKOS/RDFskos:Concept
Fiction
Metafiction
Novels
Literature
Allegories
Adventure stories
rdf:type
skos
:prefL
abel
skos:altLabelskos
:nar
rowe
r
skos:altLabel
skos
:nar
row
er
skos:broader
skos:prefLabel
skos:prefLabel
skos:prefLabel
http://id.loc.gov/…#concept
![Page 111: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/111.jpg)
111
Usage of the LOC graph
skos:Concept Historical Fiction
Fiction
The Glass Palace
rdf:t
ype
skos:prefLabel
dc:s
ubje
ct
skos:broader
http:.//…/isbn/…
skos:prefLabel
dc:title
![Page 112: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/112.jpg)
112
Importance of SKOS SKOS provides a simple bridge between
the “print world” and the (Semantic) Web Thesauri, glossaries, etc, from the library
community can be made available LOC is a good example
SKOS can also be used to organize tags, annotate other vocabularies, …
![Page 113: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/113.jpg)
113
Importance of SKOS Anybody in the World can refer to
common concepts they mean the same for everybody
Applications may exploit the relationships among concepts eg, SPARQL queries may be issued on the
merge of the library data and the LOC terms
![Page 114: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/114.jpg)
114
Semantic portal for art collections
Courtesy of Jacco van Ossenbruggen, CWI, and Guus Schreiber, VU Amsterdam
![Page 115: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/115.jpg)
115
Ontologies(OWL)
![Page 116: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/116.jpg)
116
SKOS is not enough… SKOS may be used to provide simple
vocabularies But it is not a complete solution
it concentrates on the concepts only no characterization of properties in general simple from a logical perspective
ie, few inferences are possible
![Page 117: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/117.jpg)
117
Application may want more… Complex applications may want more
possibilities: characterization of properties identification of objects with different URI-s disjointness or equivalence of classes construct classes, not only name them more complex classification schemes can a program reason about some terms? E.g.:
“if «Person» resources «A» and «B» have the same «foaf:email» property, then «A» and «B» are identical”
etc.
![Page 118: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/118.jpg)
118
Web Ontology Language = OWL OWL is an extra layer, a bit like RDFS or
SKOS own namespace, own terms it relies on RDF Schemas
It is a separate recommendation actually… there is a 2004 version of OWL
(“OWL 1”) and there is an update (“OWL 2”) published in
2009
![Page 119: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/119.jpg)
119
OWL is complex… OWL is a large set of additional terms We will not cover the whole thing here…
![Page 120: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/120.jpg)
120
Term equivalences For classes:
owl:equivalentClass: two classes have the same individuals
owl:disjointWith: no individuals in common For properties:
owl:equivalentProperty remember the a:author vs. f:auteur?
owl:propertyDisjointWith
![Page 121: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/121.jpg)
121
Term equivalences For individuals:
owl:sameAs: two URIs refer to the same concept (“individual”)
owl:differentFrom: negation of owl:sameAs
![Page 122: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/122.jpg)
122
Other example: connecting to French
owl:equivalentClassa:Novel f:Roman
owl:equivalentPropertya:author f:auteur
![Page 123: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/123.jpg)
123
Typical usage of owl:sameAs Linking our example of Amsterdam from one
data set (DBpedia) to the other (Geonames):
<http://dbpedia.org/resource/Amsterdam> owl:sameAs <http://sws.geonames.org/2759793>;
This is the main mechanism of “Linking” in the Linked Open Data project
![Page 124: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/124.jpg)
124
Property characterization In OWL, one can characterize the
behavior of properties (symmetric, transitive, functional, reflexive, inverse functional…)
One property can be defined as the “inverse” of another
![Page 125: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/125.jpg)
125
What this means is… If the following holds in our triples:
:email rdf:type owl:InverseFunctionalProperty.
![Page 126: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/126.jpg)
126
What this means is… If the following holds in our triples:
:email rdf:type owl:InverseFunctionalProperty. <A> :email "mailto:[email protected]".<B> :email "mailto:[email protected]".
![Page 127: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/127.jpg)
127
What this means is… If the following holds in our triples:
:email rdf:type owl:InverseFunctionalProperty. <A> :email "mailto:[email protected]".<B> :email "mailto:[email protected]".
<A> owl:sameAs <B>.
then, processed through OWL, the following holds, too:
![Page 128: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/128.jpg)
128
Keys Inverse functional properties are
important for identification of individuals think of the email examples
But… identification based on one property may not be enough
![Page 129: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/129.jpg)
129
Keys
Identification is based on the identical values of two properties
The rule applies to persons only
“if two persons have the same emails and the samehomepages then they are identical”
![Page 130: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/130.jpg)
130
Previous rule in OWL
:Person rdf:type owl:Class; owl:hasKey (:email :homepage) .
![Page 131: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/131.jpg)
131
What it means is…If:
<A> rdf:type :Person ; :email "mailto:[email protected]"; :homepage "http://www.ex.org".
<B> rdf:type :Person ; :email "mailto:[email protected]"; :homepage "http://www.ex.org".
<A> owl:sameAs <B>.
then, processed through OWL, the following holds, too:
![Page 132: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/132.jpg)
132
Classes in OWL In RDFS, you can subclass existing
classes… that’s all In OWL, you can construct classes from
existing ones: enumerate its content through intersection, union, complement etc
![Page 133: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/133.jpg)
133
Enumerate class content
I.e., the class consists of exactly of those individuals and nothing else
:Currency rdf:type owl:Class; owl:oneOf (:€ :£ :$).
![Page 134: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/134.jpg)
134
Union of classes
Other possibilities: owl:complementOf, owl:intersectionOf, …
:Novel rdf:type owl:Class.:Short_Story rdf:type owl:Class.:Poetry rdf:type owl:Class.:Literature rdf:type owl:Class; owl:unionOf (:Novel :Short_Story :Poetry).
![Page 135: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/135.jpg)
135
For example…If:
:Novel rdf:type owl:Class.:Short_Story rdf:type owl:Class.:Poetry rdf:type owl:Class.:Literature rdf:type owl:Class; owl:unionOf (:Novel :Short_Story :Poetry).
<myWork> rdf:type :Novel .
<myWork> rdf:type :Literature .
then the following holds, too:
![Page 136: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/136.jpg)
136
It can be a bit more complicated…If:
:Novel rdf:type owl:Class.:Short_Story rdf:type owl:Class.:Poetry rdf:type owl:Class.:Literature rdf:type owlClass; owl:unionOf (:Novel :Short_Story :Poetry).
fr:Roman owl:equivalentClass :Novel .
<myWork> rdf:type fr:Roman .
<myWork> rdf:type :Literature .
then, through the combination of different terms, the following still holds:
![Page 137: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/137.jpg)
137
What we have so far… The OWL features listed so far are
already fairly powerful E.g., various databases can be linked via
owl:sameAs, functional or inverse functional properties, etc.
Many inferred relationship can be found using a traditional rule engine
![Page 138: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/138.jpg)
138
However… that may not be enough Very large vocabularies might require
even more complex features some major issues
the way classes (i.e., “concepts”) are defined handling of datatypes like intervals
OWL includes those extra features but… the inference engines become (much) more complex
![Page 139: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/139.jpg)
139
Example: property value restrictions New classes are created by restricting
the property values on a class For example: how would I characterize a
“listed price”? it is a price that is given in one of the
“allowed” currencies (€, £, or $) this defines a new class
![Page 140: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/140.jpg)
140
But: OWL is hard! The combination of class constructions with
various restrictions is extremely powerful What we have so far follows the same logic
as before extend the basic RDF and RDFS possibilities with
new features define their semantics, ie, what they “mean” in
terms of relationships expect to infer new relationships based on those
However… a full inference procedure is hard not implementable with simple rule engines, for
example
![Page 141: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/141.jpg)
141
OWL “species” or profiles OWL species comes to the fore:
restricting which terms can be used and under what circumstances (restrictions)
if one abides to those restrictions, then simpler inference engines can be used
They reflect compromises: expressiveness vs. implementability
![Page 142: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/142.jpg)
142
OWL Species
OWL Full
OWL DL
OWL EL OWL RL
OWL QL
![Page 143: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/143.jpg)
143
OWL RL Goal: to be implementable with rule
engines Usage follows a similar approach to
RDFS: merge the ontology and the instance data
into an RDF graph use the rule engine to add new triples (as
long as it is possible)
![Page 144: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/144.jpg)
144
What can be done in OWL RL? Many features are available:
identity of classes, instances, properties subproperties, subclasses, domains, ranges union and intersection of classes (but with some
restrictions) property characterizations (functional, symmetric,
etc) property chains keys some property restrictions
All examples so far could be inferred with OWL RL!
![Page 145: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/145.jpg)
145
Improved Search via Ontology (GoPubMed) Search results are re-ranked using
ontologies related terms are highlighted
![Page 146: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/146.jpg)
146
Improved Search via Ontology (Go3R)Same dataset, different ontology
(ontology is on non-animal experimentation)
![Page 147: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/147.jpg)
147
Rules(RIF)
![Page 148: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/148.jpg)
148
Why rules on the Semantic Web? Some conditions may be complicated in
ontologies (ie, OWL) eg, Horn rules: (P1 & P2 & …) → C
In many cases applications just want 2-3 rules to complete integration
Ie, rules may be an alternative to (OWL based) ontologies
![Page 149: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/149.jpg)
149
Things you may want to express An example from our bookshop
integration: “I buy a novel with over 500 pages if it costs
less than €20” something like (in an ad-hoc syntax):
{ ?x rdf:type p:Novel; p:page_number ?n; p:price [ p:currency :€; rdf:value ?z ]. ?n > "500"^^xsd:integer. ?z < "20.0"^^xsd:double. }=> { <me> p:buys ?x }
![Page 150: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/150.jpg)
150
Things you may want to express
p:Novel
?x
?n
:€
?z ?z<20
?n>500rdf:type
p:page_number
p:price
rdf:value
p:currency
p:buys ?xme
![Page 151: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/151.jpg)
151
RIF (Rule Interchange Format) The goals of the RIF work:
define simple rule language(s) for the (Semantic) Web
define interchange formats for rule based systems
RIF defines several “dialects” of languages
RIF is not bound to RDF only eg, relationships may involve more than 2
entities there are dialects for production rule systems
![Page 152: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/152.jpg)
152
RIF Core The simplest RIF “dialect” A Core document is
directives like import, prefix settings for URI-s, etc
a sequence of logical implications
![Page 153: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/153.jpg)
153
RIF Core exampleDocument( Prefix(cpt http://example.com/concepts#) Prefix(person http://example.com/people#) Prefix(isbn http://…/isbn/)
Group ( Forall ?Buyer ?Book ?Seller ( cpt:buy(?Buyer ?Book ?Seller):- cpt:sell(?Seller ?Book ?Buyer) ) cpt:sell(person:John isbn:000651409X person:Mary) ))
This infers the following relationship:
cpt:buy(person:Mary isbn:000651409X person:John)
![Page 154: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/154.jpg)
154
Expressivity of RIF Core Formally: definite Horn without function
symbols, a.k.a. “Datalog” eg, p(a,b,c) is fine, but p(f(a),b,c) is not
Includes some extra features built-in datatypes and predicates “local” symbols, a bit like blank nodes
![Page 155: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/155.jpg)
155
Expressivity of RIF Core There are also “safeness measures”
eg, variable in a consequent should be in the antecedent
this secures a straightforward implementation strategy (“forward chaining”)
![Page 156: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/156.jpg)
156
RIF Syntaxes RIF defines
a “presentation syntax” a standard XML syntax to encode and
exchange the rules there is a draft for expressing Core in RDF
just like OWL is represented in RDF
![Page 157: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/157.jpg)
157
What about RDF and RIF? Typical scenario:
the “data” of the application is available in RDF
rules on that data is described using RIF the two sets are “bound” (eg, RIF “imports”
the data) a RIF processor produces new relationships
![Page 158: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/158.jpg)
158
To make RIF/RDF work Some technical issues should be settled:
RDF triples have to be representable in RIF various constructions (typing, datatypes, lists)
should be aligned the semantics of the two worlds should be
compatible There is a separate document that brings
these together
![Page 159: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/159.jpg)
159
Remember the what we wanted from Rules?
{ ?x rdf:type p:Novel; p:page_number ?n; p:price [ p:currency :€; rdf:value ?z ]. ?n > "500"^^xsd:integer. ?z < "20.0"^^xsd:double. }=> { <me> p:buys ?x }
![Page 160: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/160.jpg)
160
The same with RIF Presentation syntaxDocument ( Prefix … Group ( Forall ?x ?n ?z ( <me>[p:buys->?x] :- And( ?x rdf:type p:Novel ?x[p:page_number->?n p:price->_abc] _abc[p:currency->:€ rdf:value->?z] External( pred:numeric-greater-than(?n "500"^^xsd:integer) ) External( pred:numeric-less-than(?z "20.0"^^xsd:double) ) ) ) ))
![Page 161: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/161.jpg)
161
Discovering new relationships…Forall ?x ?n ?z ( <me>[p:buys->?x] :- And( ?x # p:Novel ?x[p:page_number->?n p:price->_abc] _abc[p:currency->:€ rdf:value->?z] External( pred:numeric-greater-than(?n "500"^^xsd:integer) ) External( pred:numeric-less-than(?z "20.0"^^xsd:double) ) ))
![Page 162: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/162.jpg)
162
Discovering new relationships…Forall ?x ?n ?z ( <me>[p:buys->?x] :- And( ?x # p:Novel ?x[p:page_number->?n p:price->_abc] _abc[p:currency->:€ rdf:value->?z] External( pred:numeric-greater-than(?n "500"^^xsd:integer) ) External( pred:numeric-less-than(?z "20.0"^^xsd:double) ) ))
<http://…/isbn/…> a p:Novel; p:page_number "600"^^xsd:integer ; p:price [ rdf:value "15.0"^^xsd:double ; p:currency :€ ] .
combined with:
![Page 163: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/163.jpg)
163
Discovering new relationships…Forall ?x ?n ?z ( <me>[p:buys->?x] :- And( ?x # p:Novel ?x[p:page_number->?n p:price->_abc] _abc[p:currency->:€ rdf:value->?z] External( pred:numeric-greater-than(?n "500"^^xsd:integer) ) External( pred:numeric-less-than(?z "20.0"^^xsd:double) ) ))
<http://…/isbn/…> a p:Novel; p:page_number "600"^^xsd:integer ; p:price [ rdf:value "15.0"^^xsd:double ; p:currency :€ ] .
combined with:
<me> p:buys <http://…/isbn/…> .
yields:
![Page 164: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/164.jpg)
164
RIF vs. OWL? The expressivity of the two is fairly
identical the emphasis are a bit different
Using rules vs. ontologies may largely depend on available tools personal technical experience and expertise taste…
![Page 165: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/165.jpg)
165
What about OWL RL? OWL RL stands for “Rule Language”… OWL RL is in the intersection of RIF Core
and OWL inferences in OWL RL can be expressed with RIF
rules RIF Core engines can act as OWL RL engines
![Page 166: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/166.jpg)
166
Inferencing and SPARQL Question: how do SPARQL queries and
inferences work together? RDFS, OWL, and RIF produce new
relationships on what data do we query?
Answer: in current SPARQL, that is not defined
But, in SPARQL 1.1 it is…
![Page 167: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/167.jpg)
167
SPARQL 1.1 and RDFS/OWL/RIF
RDF Data with extra triples
SPARQL Pattern
entailment
pattern matching
RDF Data
RDFS/OWL/RIF data
SPARQL Pattern
Query result
SPARQL Engine with entailment
![Page 168: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/168.jpg)
168
What have we achieved?(putting all this together)
![Page 169: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/169.jpg)
169
Remember the integration example?
Data in various formats
Data represented in abstract format
Applications
Map,Expose,…
ManipulateQuery…
![Page 170: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/170.jpg)
170
Same with what we learned
Data in various formats
Data represented in RDF with extra knowledge (RDFS, SKOS, RIF, OWL,…)
Applications
RDB RDF,GRDL, RDFa,…
SPARQL,Inferences…
![Page 171: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/171.jpg)
171
eTourism: provide personalized itinerary
Integration of relevant data in Zaragoza (using RDF and ontologies)
Use rules on the RDF data to provide a proper itinerary
Courtesy of Jesús Fernández, Mun. of Zaragoza, and Antonio Campos, CTIC (SWEO Use Case)
![Page 172: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/172.jpg)
172
Available documents, resources
![Page 173: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/173.jpg)
173
Available specifications: Primers, Guides The “RDF Primer” and the “OWL Guide”
give a formal introduction to RDF(S) and OWL
SKOS has its separate “SKOS Primer” GRDDL Primer and RDFa Primer have
been published The W3C Semantic Web Activity Wiki has
links to all the specifications
![Page 174: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/174.jpg)
174
“Core” vocabularies There are also a number “core vocabularies”
Dublin Core: about information resources, digital libraries, with extensions for rights, permissions, digital right management
FOAF: about people and their organizations DOAP: on the descriptions of software projects SIOC: Semantically-Interlinked Online Communities vCard in RDF …
One should never forget: ontologies/vocabularies must be shared and reused!
![Page 175: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/175.jpg)
175
Some books J. Pollock: Semantic Web for Dummies,
2009 G. Antoniu and F. van Harmelen:
Semantic Web Primer, 2nd edition in 2008 D. Allemang and J. Hendler: Semantic
Web for the Working Ontologist, 2008 P. Hitzler, R. Sebastian, M. Krötzsch:
Foundation of Semantic Web Technologies, 2009
…See the separate Wiki page collecting book references
![Page 176: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/176.jpg)
176
Lots of Tools (not an exhaustive list!) Categories:
Triple Stores Inference engines Converters Search engines Middleware CMS Semantic Web
browsers Development
environments Semantic Wikis …
Some names: Jena, AllegroGraph, Mulgara,
Sesame, flickurl, … TopBraid Suite, Virtuoso
environment, Falcon, Drupal 7, Redland, Pellet, …
Disco, Oracle 11g, RacerPro, IODT, Ontobroker, OWLIM, Talis Platform, …
RDF Gateway, RDFLib, Open Anzo, DartGrid, Zitgist, Ontotext, Protégé, …
Thetus publisher, SemanticWorks, SWI-Prolog, RDFStore…
…
![Page 177: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/177.jpg)
177
Further information Planet RDF aggregates a number of SW
blogs: http://planetrdf.com/
Semantic Web Interest Group a forum developers with archived (and public)
mailing list, and a constant IRC presence on freenode.net#swig
anybody can sign up on the list http://www.w3.org/2001/sw/interest/
![Page 178: Introduction to Semantic Web Technologies Ivan Herman, W3C June 22 nd , 2010](https://reader037.vdocuments.mx/reader037/viewer/2022102810/56814d5c550346895dba9960/html5/thumbnails/178.jpg)
Thank you for your attention!
These slides are also available on the Web: http://www.w3.org/2010/Talks/0622-SemTech-IH/