Top Banner
Tomasz Pluskiewicz Infusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1
51

Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Dec 22, 2015

Download

Documents

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: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Tomasz Pluskiewicz Infusion

INTRODUCTION TO THE SEMANTIC WEB

2012-11-28

Introduction to the Semantic Web 1

Page 2: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Agenda

What is the Semantic Web? What is data in the Semantic Web? Storing and publishing semantic data Querying the Semantic Web What is there for developers? How does the Semantic Web compare? So who actually does the Semantic Web?

2012-11-28Introduction to the Semantic Web

2

Page 3: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

What is the Semantic Web?

2012-11-28

3

Introduction to the Semantic Web

Page 4: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

What is the Semantic Web?

Semantics = meaning (from Greek) Set of practices and standards Synonymous or related to:

Web of data Linked data (cloud) Giant Global Graph (GGG) Web 3.0 Open Data Big Data

2012-11-28Introduction to the Semantic Web

4

Page 5: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

So what is it about?

Allowing machines to understand data Ease sharing and mixing data Extend the World Wide Web rather than

replace it

2012-11-28Introduction to the Semantic Web

5

Page 6: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Little bit of history

1969: paper Semantic Information Processing by Ross Quillial

1980s: CYC and WordNet mid- to late 1990s: Tim Berners-Lee

coins the term Semantic Web Today: dbpedia: 1.2m triples

2012-11-28Introduction to the Semantic Web

6

Page 7: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Semantic Web building blocks

7

Page 8: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Representation

The basics of semantic data

2012-11-28

8

Introduction to the Semantic Web

Page 9: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

It’s all about resources9

Page 10: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

It’s all about resources

Extensive use of URIs (and most often URLs)

(Almost) everyting is a URI

Example URIs: http://infusion.com/people/tpluskiewicz urn:isbn:1898432023 http://xmlns.com/foaf/0.1/firstName

2012-11-28Introduction to the Semantic Web

10

Page 11: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

It’s all findable about resources

2012-11-28

Identifier Representation Resource itself

11

URI (URL?) HTML, RDF Described object

Introduction to the Semantic Web

Identifier URI should be different than the representation URI

Identifiers should not change

Page 12: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Cool URIs

Resource and representation have different URIs

Hash URIs http://www.example.com/about#alice http://www.example.com/about.html

„Normal” URIs http://www.example.com/id/bob http://www.example.com/people/bob.html

2012-11-28Introduction to the Semantic Web

12

Page 13: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Representing the data13

Page 14: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Resource Description Format Facts and relations organized in triples Triples mimic natural language

sentences Graphical representation is a directed

graph

My name is Tomasz Pluskiewicz.My age is 26.I work for Infusion.

2012-11-28Introduction to the Semantic Web

14

Page 15: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Resource Description Format

ex:tpluskiewicz

2012-11-28Introduction to the Semantic Web

15

Tomasz Pluskiewicz

26

foaf:ageldif:company

foaf:fullName

ex:Infusion

Page 16: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Serializing RDF triples

2012-11-28

RDF/XML (.rdf) Notation3 (.n3) N-Triples (.nt) Turtle (.ttl) JSON-LD TriG (.trig) TriX (.trix)

application/rdf+xml

text/n3 text/plain text/turtle

16

Format MIME type

Introduction to the Semantic Web

Page 17: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

RDF/XML vs Turtle

2012-11-28

Difficult to author Verbose No cannonical

serialization

Simple Concise Has means of

further compressing content

17

RDF/XML Turtle

Introduction to the Semantic Web

Page 18: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

There can be multiple graphs Sets of triples form graphs Graphs can be named with a URI Named graph are also resources, hence

there can be triples describing those graphs

2012-11-28Introduction to the Semantic Web

18

Page 19: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Adding meaning

The basics of semantic data

2012-11-28

19

Introduction to the Semantic Web

Page 20: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Representing the data20

Page 21: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Basics of RDF(S) resources

2012-11-28

rdfs:Resource rdfs:Class rdfs:Property rdfs:Datatype rdfs:Literal

rdf:type rdfs:label rdfs:subClassOf rdfs:subPropertyO

f rdfs:range rdfs:domain

21

classes properties

Introduction to the Semantic Web

Page 22: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Web Ontology Language

OWL: Lite, DL and Full OWL 2: EL, QL and RL Defining constraints Enables defining complex rules Uses specialized syntaxes Base terms: owl:Thing, owl:Nothing,

owl:DatatypeProperty, owl:ObjectProperty, owl:sameAs

2012-11-28Introduction to the Semantic Web

22

Page 23: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Common ontologies

Friend of a Friend Dublin Core SIOC SKOS

UMBEL Suggested Upper Merged Ontology

2012-11-28Introduction to the Semantic Web

23

Geonames BIBO

Page 24: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Specialized ontologies

Gene Ontology GOLD (General O. for Linguistic

Description) Foundational Model of Anatomy GoodRelations Lexvo

2012-11-28Introduction to the Semantic Web

24

Page 25: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Storing and publishing

2012-11-28

26

Introduction to the Semantic Web

Page 26: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Storing in relational databases Mapping tables to triples:

D2RQ R2RML Ultrawrap

Using RDBMS with RDF built-in capabilities Oracle 11g Virtuoso Jena SDB IBM DB2

2012-11-28Introduction to the Semantic Web

27

Page 27: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Native triplestores

Using native triple (quad) stores Virtuoso AllegroGraph BigOWLIM Jena TDB 4store Stardog Dydra

2012-11-28Introduction to the Semantic Web

28

Page 28: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Publishing data easily

Embedding semantic markup in HTML Microformats Microdata RDFa

Directly publishing RDF documents

http://manu.sporny.org/2011/uber-comparison-rdfa-md-uf/

2012-11-28Introduction to the Semantic Web

29

Page 29: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Microformats example

2012-11-28

<ul>

<li>

Joe Doe</li>

<li>

The Example Company

</li>

<li>

604-555-1234</li>

<li>

<a>

Website</a>

</li>

</ul>

30

<ul class="vcard">

<li class="vcard">

Joe Doe</li>

<li class="org">

The Example Company

</li>

<li class="tel">

604-555-1234</li>

<li>

<a class="url">

Website</a>

</li>

</ul>Introduction to the Semantic Web

Page 30: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Microdata example

<section itemscope itemtype="http://data-vocabulary.org/Person"> Hello, my name is <span itemprop="name">John Doe</span>,

I am a <span itemprop="title">graduate research assistant</span> at the <span itemprop="affiliation">University of Dreams</span>. My friends call me <span itemprop="nickname">Johnny</span>. You can visit my homepage at <a href="http://www.JohnnyD.com" itemprop="url">www.JohnnyD.com</a>.

<section itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address"> I live at <span itemprop="street-address">1234 Peach Drive</span> <span itemprop="locality">Warner Robins</span> , <span itemprop="region">Georgia</span>.

</section>

</section>

2012-11-28Introduction to the Semantic Web

31

Page 31: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

RDFa example

<p xmlns:dc="http://purl.org/dc/elements/1.1/" about="http://www.example.com/books/wikinomics"> In his latest book <cite property="dc:title">Wikinomics</cite>, <span property="dc:creator">Don Tapscott</span> explains deep changes in technology, demographics and business. The book is due to be published in <span property="dc:date" content="2006-10-01">October 2006</span>.

</p>

2012-11-28Introduction to the Semantic Web

32

Page 32: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Querying the Semantic Web33

Page 33: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Publishing queryable data

SPARQL Protocol and RDF Query Language

Remote queries through SPARQL Endpoints

SPARQL 1.1 features: ASK, SELECT, DESCRIBE, CONSTRUCT Aggregates Federated queries Extensibilty, XPath, subqueries

SPARQL Update2012-11-28Introduction to the Semantic Web

34

Page 34: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

SPARQL Examples

2012-11-28Introduction to the Semantic Web

35

Page 35: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

SPARQL + rules = SPIN

SPARQL Inferencing Developed by TopQuadrant Components of SPIN:

Represent SPARQL queries as RDF triples Allow modularizing queries with

spin:Function and spin:Template spin:MagicProperty ASK to create constraints CONSTRUCT to create rules

2012-11-28Introduction to the Semantic Web

36

Page 36: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Constraints and rules

2012-11-28

37

Introduction to the Semantic Web

Page 37: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Functions and templates

2012-11-28

38

Introduction to the Semantic Web

Page 38: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

What is there for developers?

dotNetRDF Jena/ARQ Rdflib RDF.rb EasyRdf Rdfquery Redland

(Web)Protégé TopBraid

Composer NeOn OntoWiki Semantic

MediaWiki Cubic Web

Programming toolsDesign tools and frameworks

Page 39: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Semantic Web vs X

2012-11-28

40

Introduction to the Semantic Web

Page 40: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Semantic Web vs XML

2012-11-28

Data representation (model)

Graph xsd and XPath Schema defined with

RDFS or OWL URI identifiers

Data serialization (syntax)

Tree xsd and XPath DTD or XML schema

No built-in identifiers

41

Semantic Web (RDF) XML

Introduction to the Semantic Web

Page 41: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Semantic Web vs REST

2012-11-28

URIs identify resources

HTTP encouraged to allow dereferencing

Uniform RDF messages

Resources are linked (triples)

Application specific

Resource Identification

Uniform Interface

Self-Describing Messages

Hypermedia Driving Application State

Stateless Interactions

42

Semantic Web REST

Introduction to the Semantic Web

Page 42: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Semantic Web vs RDBMS

2012-11-28

SPARQL Felxible and

extensible schema Easy data distribution Depends on vendor Easier process BI Open World

SQL Schema must be

defined first and is rather rigid

Painful replication ACID Transactions Strict ETL Closed World

43

Semantic Web Relational databases

Introduction to the Semantic Web

Page 43: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Semantic Web vs NoSQL

2012-11-28

SPARQL Graph Schemaless Named graphs Built on standards

and interoperability Can seem scientific

and complicated

Various APIs Graph, doc, key-value Schemaless Documents (doc DBs) Tackle specific

problems (latency, scale, perf.)

Designed for easy adoption

44

Semantic Web NoSQL

Introduction to the Semantic Web

Page 44: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Who actually does the Semantic Web?

Is it happening?

2012-11-28

46

Introduction to the Semantic Web

Page 45: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Linked data and open data

Dbpedia Freebase Geonames Social data Media Government data Publications Many many other

datahub.io lod.openlinksw.co

m data.gov data.gov.uk datadotgc.ca openlibrary.org bnb.data.bl.uk

2012-11-28Introduction to the Semantic Web

http://richard.cyganiak.de/2007/10/lod/lod-datasets_2011-09-19_colored.html

Page 46: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Who does the Semantic Web?

2012-11-28

IBM DB2 Open Services

Lifecycle Collaboration

Linked Data Platform

Oracle 11g Triplestore Reasoner

48

IBM Oracle

Introduction to the Semantic Web

Page 47: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Who does the Semantic Web?

2012-11-28

Webmaster tools Knowledge graph Freebase RDFa/Microdata

(also Yahoo)

Open Graph Protocol

49

Google Facebook

Introduction to the Semantic Web

Page 48: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Who does the Semantic Web?

2012-11-28

Thousands of datasetsSome offered in RDFLinked by Linking Open Government Data project(200 datasets)

Open Government Partnership (50+ countries)

Gene research Language

processing Semantic

MediaWiki

50

Government/public data Academic work

Introduction to the Semantic Web

Page 49: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Where to learn in person?

Semantic Technology & Business Conference Berlin, London, New York, San Francisco

European Semantic Web Symposium International Semantic Web Conference International World Wide Web Conference International Conference on Semantic Web

and Web Services Semantic Web Applications and Tools for

Life Sciences2012-11-28Introduction to the Semantic Web

51

Page 50: Tomasz PluskiewiczInfusion INTRODUCTION TO THE SEMANTIC WEB 2012-11-28 Introduction to the Semantic Web 1.

Some interesting links...

http://semanticweb.com/ http://patterns.dataincubator.org/book/ http://www.w3.org/standards/semanticweb/ http://spinrdf.org Wikipedia http://semanticweb.com/breaking-into-the-nosql-

conversation_b27146 http://gigaom.com/2012/03/11/is-big-data-new-or-have-we-

forgotten-its-old-heroes/ http://www.snee.com/bobdc.blog/2012/10/sparql-and-big-data-

and-nosql.html http://dret.net/netdret/docs/soa-rest-www2009/rest http://www.mkbergman.com/ http://www.cambridgesemantics.com/semantic-university

2012-11-28Introduction to the Semantic Web

52