Top Banner
24/05/2016 Cinvestav-Tamaulipas 1 Semantic Web Technologies Introduction Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content Semantic Web Context Relevance Basic Concepts Architecture Moving to Semantic Web Information extraction Information representation Languages and Tools XML y RDF SPARQL Case Study Generation of RDF DB Query of RDF Information
27

Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

Jul 24, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 1

Semantic Web Technologies

Introduction

Moving to the Semantic Web

Introduction to The Web Semantic

Technologies 2

Content

� Semantic Web Context

� Relevance

� Basic Concepts

� Architecture

� Moving to Semantic Web

� Information extraction

� Information representation

� Languages and Tools

� XML y RDF

� SPARQL

� Case Study

� Generation of RDF DB

� Query of RDF Information

Page 2: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 2

Introduction to The Web Semantic

Technologies 3

Motivation

� Growing information

� Update information requirements

� Costs

� Competitive companies

� Financial institutions

� News

� Government

� Consumers

� Needs

� Suppliers

� Resources

Introduction to The Web Semantic

Technologies 4

Motivation

� The motivation of the Semantic Web is in large part to

enable better machine processing of information:

organized metadata and logics applied to information

sources will improve the ability to reason over data

and to create knowledge by inference it from it

Page 3: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 3

Introduction to The Web Semantic

Technologies 5

Motivation

� The music site of the BBC

Introduction to The Web Semantic

Technologies 6

Motivation

� The music site of the BBC

Page 4: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 4

Introduction to The Web Semantic

Technologies 7

Motivation

� How to build such a site (option 1)

� Site editors roam the Web for new facts

� may discover further links while roaming

� They update the site manually

� The site gets soon out-of-date

� How to build such a site (option 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…

Introduction to The Web Semantic

Technologies 8

Motivation

� How to build such a site (option 3)

� Editors roam the Web for new data via API-s

� Understand those…

� input, output arguments, used datatypes, etc.

� Write some code to incorporate the new data

� Easily get out of date again…

Page 5: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 5

Introduction to The Web Semantic

Technologies 9

Motivation

� How to build such a site (a better way)

� 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

� Use the Web of Data as a Content Management System

� Use the community at large as content editors

Introduction to The Web Semantic

Technologies 10

Motivation

Page 6: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 6

Introduction to The Web Semantic

Technologies 11

Motivation

� 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

Introduction to The Web Semantic

Technologies 12

Motivation

� But data are often in isolation, “silos”

Page 7: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 7

Introduction to The Web Semantic

Technologies 13

Motivation

� Imagine …

� A “Web” where

� documents are available for download on the Internet

� but there would be no hyperlinks among them

Introduction to The Web Semantic

Technologies 14

Motivation

� The problem is real

Page 8: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 8

Introduction to The Web Semantic

Technologies 15

Motivation

� 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

Introduction to The Web Semantic

Technologies 16

Motivation

� A Web of Data unleashes new applications

Page 9: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 9

Introduction to The Web Semantic

Technologies 17

Motivation

� A nice usage of UK government data

Introduction to The Web Semantic

Technologies 18

… and now what?

� We will use a simplistic example to introduce the main Semantic

Web concepts

Page 10: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 10

Introduction to The Web Semantic

Technologies 19

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

Introduction to The Web Semantic

Technologies 20

We start with a book...

Page 11: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 11

Introduction to The Web Semantic

Technologies 21

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 Homepage

id_xyz Ghosh, Amitav http://www.amitavghosh.com

ID Publisher’s name City

id_qpr Harper Collins London

Introduction to The Web Semantic

Technologies 22

1st: export data as a set of relations

http://…isbn/000651409X

Ghosh, Amitav http://www.amitavghosh.com

The Glass Palace

2000

London

Harper Collins

a:namea:homepage

a:author

Page 12: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 12

Introduction to The Web Semantic

Technologies 23

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

� 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

Introduction to The Web Semantic

Technologies 24

Same book in French…

Page 13: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 13

Introduction to The Web Semantic

Technologies 25

Another bookstore data (dataset F)A B C D

1 ID Titre Traducteur Original2 ISBN 2020286682 Le Palais des Miroirs $A12$ ISBN 0-00-6511409-X3

4

5

6 ID Auteur7 ISBN 0-00-6511409-X $A11$8

9

10 Nom11 Ghosh, Amitav12 Besse, Christianne

Introduction to The Web Semantic

Technologies 26

2nd: export your second set of data

http://…isbn/000651409X

Ghosh, Amitav

Besse, Christianne

Le palais des miroirs

f:nom

f:traducteur

f:auteur

http://…isbn/2020386682

http://…isbn/2020386682

f:nom

Page 14: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 14

Introduction to The Web Semantic

Technologies 27

3rd: start merging data (1)

http://…isbn/000651409X

Ghosh, Amitav

Besse, Christianne

Le palais des miroirs

f:nom

f:traducteur

f:auteur

http://…isbn/2020386682

f:nom

http://…isbn/000651409X

Ghosh, Amitav

http://www.amitavghosh.com

The Glass Palace

2000

London

Harper Collins

a:namea:homepage

a:author

Introduction to The Web Semantic

Technologies 28

3rd: start merging data (2)

http://…isbn/000651409X

Ghosh, Amitav

Besse, Christianne

Le palais des miroirs

f:nom

f:traducteur

f:auteur

http://…isbn/2020386682

f:nom

http://…isbn/000651409X

Ghosh, Amitav

http://www.amitavghosh.com

The Glass Palace

2000

London

Harper Collins

a:namea:homepage

a:author

same URI !!!

Page 15: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 15

Introduction to The Web Semantic

Technologies 29

3rd: start merging data (3)

Ghosh, Amitav

Besse, Christianne

Le palais des miroirs

f:nom

f:traducteur

f:auteur

http://…isbn/2020386682

f:nom

Ghosh, Amitav

http://www.amitavghosh.com

The Glass Palace

2000

London

Harper Collins

a:namea:homepage

a:author

http://…isbn/000651409X

Introduction to The Web Semantic

Technologies 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 16: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 16

Introduction to The Web Semantic

Technologies 31

However, more can be achieved…

� We “feel” that a:author and f:auteur should be the same

� But an automatic merge does 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

Introduction to The Web Semantic

Technologies 32

3rd revisited: use the extra knowledge

Besse, Christianne

Le palais des miroirsf:original

f:nom

f:traducteur

f:auteurhttp://…isbn/2020386682

f:nom

Ghosh, Amitav

http://www.amitavghosh.com

The Glass Palace

2000

London

Harper Collins

a:name

a:homepage

a:author

http://…isbn/000651409X

http://…foaf/Person

r:typer:type

Page 17: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 17

Introduction to The Web Semantic

Technologies 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”

Introduction to The Web Semantic

Technologies 34

Combine with different datasets

� Using, e.g., the “Person”, the dataset can be combined withother sources

� For example, data in Wikipedia can be extracted usingdedicated tools

� e.g., the “dbpedia” project can extract the “infobox” information fromWikipedia already…

Page 18: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 18

Introduction to The Web Semantic

Technologies 35

Merge with Wikipedia data

Besse, Christianne

Le palais des miroirsf:original

f:nom f:traducteur

f:auteur

http://…isbn/2020386682

f:nomGhosh, Amitav

http://www.amitavghosh.com

The Glass Palace

2000

London

Harper Collins

a:namea:homepage

a:author

http://…isbn/000651409X

http://…foaf/Person

r:type

r:type

http://dbpedia.org/../Amitav_Ghosh

foaf:name w:reference

Introduction to The Web Semantic

Technologies 36

Merge with Wikipedia data

Besse, Christianne

Le palais des miroirsf:original

f:nom f:traducteur

f:auteur

http://…isbn/2020386682

f:nomGhosh, Amitav

http://www.amitavghosh.com

The Glass Palace

2000

London

Harper Collins

a:namea:homepage

a:author

http://…isbn/000651409X

http://…foaf/Person

r: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_Palacefoaf:name w:reference

w:author_of

w:author_of

w:author_of

Page 19: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 19

Introduction to The Web Semantic

Technologies 37

Merge with Wikipedia data

Besse, Christianne

Le palais des miroirsf:original

f:nom f:traducteur

f:auteur

http://…isbn/2020386682

f:nomGhosh, Amitav

http://www.amitavghosh.com

The Glass Palace

2000

London

Harper Collins

a:namea:homepage

a:author

http://…isbn/000651409X

http://…foaf/Person

r: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_Palacefoaf:name w:reference

w:author_of

w:author_of

w:author_of w:born_in

w:long w:lat

Introduction to The Web Semantic

Technologies 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 Webusers!

� The difference: a bit of extra rigour so that machines could dothis, too

Page 20: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 20

Introduction to The Web Semantic

Technologies 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, oranything in between…

� Even more powerful queries can be asked as a result

Introduction to The Web Semantic

Technologies 40

What did we do?

Data in various formats

Data represented

in abstract format

Applications

Map,

Expose,

Manipulate

Query

Page 21: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 21

Introduction to The Web Semantic

Technologies 41

So where is the Semantic Web?

� The Semantic Web provides technologies to make suchintegration possible!

� Hopefully you get a full picture at the end of the tutorial…

Introduction to The Web Semantic

Technologies 42

Another scenario

Linked Open Data

Page 22: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 22

Introduction to The Web Semantic

Technologies 43

Linked Open Data Project

� Realistic project

� Many institutions, organizations, individuals, etc.

� W3C, Google, Yahoo, IBM, etc.

� Goal: “expose” open datasets in RDF

� Set RDF links among the data items from different datasets

� Set up, if possible,

query endpoints

� http://linkeddata.org

Introduction to The Web Semantic

Technologies 44

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

� Promoters

� Freie Universität Berlin

� Universität Leipzig

� OpenLink Software

Page 23: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 23

Introduction to The Web Semantic

Technologies 45

Example data source: DBpedia

Wikipedia

infobox

Introduction to The Web Semantic

Technologies 46

Example data source: DBpedia

Wikipedia infobox

Page 24: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 24

Introduction to The Web Semantic

Technologies 47

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 ;

...

Introduction to The Web Semantic

Technologies 48

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://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> ;

...

<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> ;

...

Page 25: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 25

Introduction to The Web Semantic

Technologies 49

The LOD cloud (september 2011)

Introduction to The Web Semantic

Technologies 50

The LOD cloud (september 2011)

Page 26: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 26

Introduction to The Web Semantic

Technologies 51

The LOD cloud (september 2011)

Introduction to The Web Semantic

Technologies 52

Remember the BBC example?

Page 27: Semantic Web Technologies Introduction - CINVESTAVvjsosa/clases/tssd/s2_swebis-mig… · Moving to the Semantic Web Introduction to The Web Semantic Technologies 2 Content SemanticWebContext

24/05/2016

Cinvestav-Tamaulipas 27

Introduction to The Web Semantic

Technologies 53

NYT articles on university alumni