Title: 1. Semantic Web Modellare e Condividere per Innovare
11. Semantic WebModellare e Condividere per
Innovare
2Sommario
- Un modello per studiare linnovazione
- Il Semantic Web
- Esempi di applicazione
3Innovazione
4Innovazione
creare
idea
problemi
innovare
analizzare
micro fenomeno
macro fenomeno
complessità 6.000.000.000 persone
5Innovazione
creare
idea
problemi
innovare
analizzare
micro fenomeno
macro fenomeno
complessità
magia
6Innovazione
creare
idea
problemi
ingegneria
scienza
innovare
analizzare
micro fenomeno
macro fenomeno
complessità
magia
7Innovare
creare
idea
innovare
micro fenomeno
complessità
8 non è mai solo una questione di tecnologia
creare
idea
soluzione tecnica
soluzione sociale
innovare
micro fenomeno
complessità
9Un modello per studiare linnovazione
creare
idea
problemi
soluzione tecnica
soluzione sociale
innovare
analizzare
micro fenomeno
macro fenomeno
complessità
10Analizziamo il Web delle origini
Non riesco ad accedere allinformazione
Ipertesti Internet
creare
idea
problemi
Come trovole pagine?
URI HTTP HTML
Come posso scrivere?
soluzione tecnica
soluzione sociale
innovare
analizzare
Condividere info Link a cose interessanti
micro fenomeno
macro fenomeno
WWW
Esplosione del fenomeno Web
complessità
11Analizziamo google
Come trovole pagine?
Indici SVM
creare
idea
problemi
Google spoofing
PageRank
soluzione tecnica
soluzione sociale
innovare
analizzare
Condividere info Link a cose interessanti
micro fenomeno
macro fenomeno
Google
Il fenomeno Google
complessità
12Analizziamo il Web 2.0
Come posso scrivere?
wiki-wiki e diari Web
creare
idea
problemi
wiki blog
Come gestire tutta questa info?
soluzione tecnica
soluzione sociale
innovare
analizzare
Condividere info Link a cose interessanti
micro fenomeno
macro fenomeno
I fenomeni Wikipedia, blogosphere,
Web 2.0
complessità
13Analizziamo il Semantic Web
KR Web
Come gestire i dati sul Web?
creare
idea
problemi
?
Modellare RDF OWL SPARQL RIF
soluzione tecnica
soluzione sociale
innovare
analizzare
Condividere info Link a cose interessanti
micro fenomeno
macro fenomeno
?
Semantic Web
complessità
14(No Transcript)
15Semantic Web
- Un modo di specificare dati e relazioni tra i
dati - Permette di condividere e riusare dati tra
applicazioni, imprese e gruppi di interesse - Una collezione di tecnologie
- RDF
- RDF-S
- OWL
- GRDDL
- SPARQL
-
- La prossima onda del Web da surfare
16Tim Berners-Lees Semantic Wave (2003)
17Tim Berners-Lees Semantic Wave (2008)
18The corporate landscape is moving
- Major companies offer (or will offer) Semantic
Web tools or systems using Semantic Web - Adobe, Oracle, IBM, HP, Software AG, GE, Northrop
Gruman, Altova, Microsoft, Dow Jones, - Others are using it (or consider using it) as
part of their own operations - Novartis, Boeing, Pfizer, Telefónica,
- Some of the names of active participants in W3C
SW related groups - ILOG, HP, Agfa, SRI International, Fair Isaac
Corp., Oracle, Boeing, IBM, Chevron, Siemens,
Nokia, Pfizer, Sun, Eli Lilly,
19The 2007 Gartner predictions
- During the next 10 years, Web-based technologies
will improve the ability to embed semantic
structures it will occur in multiple
evolutionary steps - By 2017, we expect the vision of the Semantic Web
to coalesce and the majority of Web pages
are decorated with some form of semantic
hypertext. - By 2012, 80 of public Web sites will use some
level of semantic hypertext to create SW
documents 15 of public Web sites will use
more extensive Semantic Web-based ontologies to
create semantic databases - Source Finding and Exploiting Value in
Semantic Web Technologies on the Web, Gartner
Research Report, May 2007
20The Web Today
Too much information to browse, need for
searching and mashing up automatically
Large number of integrations - ad hoc -
pair-wise
Millions of Applications
?
Each site is understandable for us
Computers dont understand much
21What does understand mean?
- What we say to Web agents
- " For more information visit lta
hrefhttp//www.ex.orggt my company lt/agt Web
site. . . - What they hear
- " blah blah blah blah blah lta hrefhttp//www.ex.
orggt blah blah blah lt/agt blah blah. . . - Jet this is enought to train them to achive tasks
for us
source http//www.thefarside.com/
22What does Google understand?
- Understanding that
- page1 links page2 ? page2 is interesting
- Google is able to rank results!
- The heart of our software is PageRank, a system
for ranking web pages (that) relies on the
uniquely democratic nature of the web by using
its vast link structure as an indicator of an
individual page's value. - http//www.google.com/technology/
23Two ways for computer to understand 1/2
- Smarter machines
- Smarter data
24Two ways for computer to understand 2/2
- Smarter machines
- Such as
- Natural Langue processing (NLP)
- Audio Processing
- Image Processing (IP)
- Video Processing
- many many more
- They all work fine alone, the problem is combinig
them - E.g., NLP meets IP
- NLP What does your eye see?
- IP I see a sea
- NLP You see a c?
- IP Yes, what else could it be?
- Not the Semantic Web approach
- Smarter Data
- Make data easier for machines to publish, share,
find and understand - E.g. wornet2.1sea/noun/1 vs. wordnet2.1c/noun/10
- The Semantic Web approach
Some NLP Related Entertainment http//www.cl.cam.a
c.uk/Research/ NL/amusement.html
25The Semantic Web 1/4
- The Semantic Web is not a separate Web, but an
extension of the current one, in which
information is given well-defined meaning, better
enabling computers and people to work in
cooperation. - The Semantic Web, Scientific American Magazine,
Maggio 2001 http//www.sciam.com/article.cfm?artic
leID00048144-10D2-1C70-84A9809EC588EF21 - Key concepts
- an extension of the current Web
- in which information is given well-defined
meaning - better enabling computers and people to work in
cooperation. - Both for computers and people
26The Semantic Web 2/4
- The Semantic Web is not a separate Web, but an
extension of the current one
Web 1.0
The Web Today
27The Semantic Web 3/4
- The Semantic Web , in which information is
given well-defined meaning
Semantic Web
Web 1.0
?
Human understandable but only machine-readable
Human and machine understandable
28The Semantic Web 4/4
better enabling computers and people to work
in cooperation.
Fewer Integration - standard - multi-lateral
Even More Applications
Semantic Web
Semantic Mash-ups Search
Easier to understand for people
More understandable for computers
29Semantic Web layer cake
Already Possible
UnderInvestigation
Standardized
source http//www.w3.org/2007/03/layerCake.png
30Data Interchange RDF
31RDF Resource Description Framework
- RDF is a general method for conceptual
description or modeling of information that is
implemented in web resources - Basically speaking, the RDF data model is based
upon the idea of making statements about Web
resources, in the form of subject-predicate-object
expressions.These expressions are known as
triples in RDF terminology. - The subject denotes the resource, and the
predicate denotes traits or aspects of the
resource and expresses a relationship between the
subject and the object.
32RDF Resource Description Framework
- For example, one way to represent the notion "The
sky has the color blue" in RDF is as the triple - a subject denoting "the sky"
- wordnetsynset-sky-noun-1
- a predicate denoting "has the color"
- wordnetwordsense-color-verb-6
- an object denoting "blue
- wordnetsynset-blue-noun-1
- In FOL we could write
- predicate(subject, object)
- wnwordsense-color-verb-6(wnsynset-sky-noun-1,
wnsynset-blue-noun-1)
Click read!
33Serialization of RDF
- Serialization (N3 notation)
- subject predicate object .
- _at_prefix wn lthttp//www.w3.org/2006/03/wn/wn20/sch
ema/gt. - wnsynset-sky-noun-1 wnwordsense-color-verb-6
wnsynset-blue-noun-1 . - Serialization (N3 notation)
- ltrdfDescription about"subject"gt
- ltpredicate rdfresource"object/gt
- lt/rdfDescriptiongt
- lt rdfRDF
- xmlnsrdf"http//www.w3.org/1999/02/22-rdf-syn
tax-ns" - xmlnswn"http//www.w3.org/2006/03/wn/wn20/sch
ema/" gt - ltrdfDescription about"wnsynset-sky-noun-1"gt
- ltwnwordsense-color-verb-6
- rdfresource"wnsynset-blue-noun-1"/gt
- lt/rdfDescriptiongt
- lt/rdfRDFgt
34Example BBCs Artist as Linked Data
- lt?xml version"1.0" encoding"utf-8"?gt
- ltrdfRDF
- xmlnsrdf "http//www.w3.org/1999/02/22-rdf-synt
ax-ns" - xmlnsrdfs "http//www.w3.org/2000/01/rdf-schema
" - xmlnsowl "http//www.w3.org/2002/07/owl"
- xmlnsdc "http//purl.org/dc/elements/1.1/"
- xmlnsfoaf "http//xmlns.com/foaf/0.1/"
- xmlnsrel "http//www.perceive.net/schemas/relat
ionship/" - xmlnsmo "http//purl.org/ontology/mo/"
- xmlnsrev "http//purl.org/stuff/rev" gt
- ltrdfDescription rdfabout"/music/artists/a3cb23f
c-acd3-4ce0-8f36-1e5aa6a18432.rdf"gt - ltrdfslabelgtDescription of the artist
U2lt/rdfslabelgt - ltfoafprimaryTopic rdfresource"/music/artists/
a3cb23fc-acd3-4ce0-8f36-1e5aa6a18432artist"/gt - lt/rdfDescriptiongt
- ltmoMusicGroup rdfabout"/music/artists/a3cb23fc-
acd3-4ce0-8f36-1e5aa6a18432artist"gt - ltfoafnamegtU2lt/foafnamegt
- ltowlsameAs rdfresource"http//dbpedia.org/res
ource/U2" /gt - ltfoafpage rdfresource"/music/artists/a3cb23fc
-acd3-4ce0-8f36-1e5aa6a18432.html" /gt - ltmomusicbrainz rdfresource"http//musicbrainz
.org/artist/a3cb23fc-acd3-4ce0-8f36-1e5aa6a18432.h
tml" /gt
HTML http//www.bbc.co.uk/music/artists/a3cb23fc-
acd3-4ce0-8f36-1e5aa6a18432 RDF
http//www.bbc.co.uk/music/artists/a3cb23fc-acd3-4
ce0-8f36-1e5aa6a18432.rdf
35If you want to see the triples
- RDF is not always serialized in N3 notation, so
if you want to see the triples you can use W3C
RDF Validation Service - http//www.w3.org/RDF/Validator/
- To see the triples in the RDF version of the page
about U2 on BCC - http//www.w3.org/RDF/Validator/ARPServlet?URIhtt
p3A2F2Fwww.bbc.co.uk2Fmusic2Fartists2Fa3cb23
fc-acd3-4ce0-8f36-1e5aa6a18432.rdfPARSEParseUR
I3ATRIPLES_AND_GRAPHPRINT_TRIPLESFORMATPNG_E
MBED
36Query SPARQL
37What is SPARQL?
- SPARQL
- is the query language of the Semantic Web
- stays for SPARQL Protocol and RDF Query Language
- A Query Language ...Find names and websites of
contributors to PlanetRDF PREFIX foaf
lthttp//xmlns.com/foaf/0.1/gt SELECT ?name
?website FROM lthttp//planetrdf.com/bloggers.rdfgt
WHERE ?person foafweblog ?website
?person foafname ?name . ?website a
foafDocument - ... and a Protocol.http//.../qps?
query-langhttp//www.w3.org/TR/rdf-sparql-query/
graph-idhttp//planetrdf.com/bloggers.rdf
queryPREFIX foaf lthttp//xmlns.com/foaf/0.1/...
38Ontology RDF-S and OWL
39What does it mean?
Formal, explicit specification of a shared
conceptualization
40How much explicit shall the specification be?
A little semantics, goes a long way James
Hendler, 2001
41A simple ontology
42Specifying classes, sub-classes and instances
- Creating a class
- RDFS Artist rdftype rdfsClass .
- FOL ?x Artist(x)
- Creating a subclass
- RDFS Painter rdfssubClassOf Artist .
- RDFS Sculptor rdfssubClassOf Artist .
- FOL ?x Painter(x) ? Sculptor(x) ? Artist(x)
- Creating an instance
- RDFS Rodin rdftype Sculptor .
- FOL Sculptor(Rodin)
Artist
Painter
Sculptor
Rodin
43Specifying properties and sub-properties
- Creating a property
- RDFS creates rdftype rdfProperty .
- FOL ?x ?y Creates(x,y)
- Using a property
- RDFS Rodin creates TheKiss .
- FOL Creates(Rodin, TheKiss)
- Creating subproperties
- RDFS paints rdfssubPropertyOf creates .
- FOL ?x ?y Paints(x,y) ? Creates(x,y)
- RDFS sculpts rdfssubPropertyOf creates .
- FOL ?x ?y Sculpts(x,y) ? Creates(x,y)
creates
paints
- 42 -
44Specifying domain/range constrains
- Checking which classes and properties can be use
together - RDFS
- creates rdfsdomain Artist .
- creates rdfsrange Piece .
- paints rdfsdomain Painter .
- paints rdfsrange Paint .
- sculpts rdfsdomain Sculptor .
- sculpts rdfsrange Sculpt .
- FOL
- ?x ?y Creates(x,y) ? Artist(x) ? Piece(y)
- ?x ?y Paints(x,y) ? Painter(x) ? Paint(y)
- ?x ?y Sculpts(x,y) ? Sculptor(x) ? Sculpt(y)
45The ontology we specified
46RDF semantics (a part of it)
- hypothesis conclusion
- x rdfssubClassOf y . a rdftype y .a
rdftype x . - x rdfssubClassOf y . x rdfssubClassOf z .y
rdfssubClassOf z . - x a y . x b y . a
rdfssubPropertyOf b . - a rdfssubPropertyOf b . a rdfssubPropertyOf c
.b rdfssubPropertyOf c . - x a y . x rdftype z .a
rdfsdomain z . - x a u . u rdftype z .a
rdfsrange z .
Read out more in RDF Semantics http//www.w3.org/T
R/rdf-mt/
47 First Order Calculus and RDF semantics
- RDFS inference rules are valid deduction
- hypothesis Conclusion
- p rdfssubClassOf q . a rdftype q .
- a rdftype p .
- In FOL
- ?x P(x) ? Q(x),
- P(A)
- ? Q(A)
- We can demonstate that it is a valid deduction
using First Order Calculus - 1. ?x P(x) ? Q(x) hypothesis
- 2. P(A) hypothesis
- 3. P(A) ? Q(A) E?(1)
- 4. Q(A) E?(3,2)
48Without Inference
- A recipient, that only understands XML syntax,
- receiving
- ltRDFgt
- ltDescription about"Rodin"gt
- ltsculpts resource"TheKiss"/gt
- lt/Descriptiongt
- lt/RDFgt
- can answer the following queries
- What does Rodin sculpt?
- RDF/Description_at_about'Rodin'/sculpts/_at_resource
- Who does sculpt TheKiss?
- RDF/Descriptionsculpts/_at_resource'TheKiss'/_at_abou
t - Try out your self at http//www.mizar.dk/XPath/
- but it cannot answer
- Who is Rodin?
- What is TheKiss?
- Is there any Sculptor/Scupts?
- Is there any Artist/Piece?
49Knowing the ontology and RDF semantics
- A recipient, that knows the ontology and
understands RDF semantics, - Receiving Rodin sculpts TheKiss .
Rodin
TheKiss
50 a reasoner can answer 1/2
- the previous queries
- What does Rodin sculpt?
- PREFIX rdfs lthttp//www.w3.org/2000/01/rdf-schema
gt - PREFIX ex lthttp//www.ex.org/schemagt
- SELECT ?x
- WHERE exRodin exsculpts ?x
- ?x exTheKiss
- Who does sculpt TheKiss?
- WHERE exRodin exsculpts ?x
- ?x exRodin
- and it can also answer
- Who is Rodin?
- WHERE exRodin a ?x
- ?x exArtist, exSculptor, rdfsResource
- What is TheKiss?
- WHERE exTheKiss a ?x
- ?x exSclupt, exPiece, rdfsResource
51 a reasoner can answer 2/2
- Is there any Sculptor?
- WHERE ?x a exSculptor
- ?x exRodin
- Is the any Artist?
- WHERE ?x a exArtist
- ?x exRodin
- Is there any Sculpt?
- WHERE ?x a exSculpt
- ?x exTheKiss
- Is there any Piece?
- WHERE ?x a exPiece
- ?x exTheKiss
- Is there any Paint?
- WHERE ?x a exPaint
- 0 results
- Is there any Painter?
- WHERE ?x a exPainter
- 0 results
52SPARQL vs Reasoner
- SPARQL alone cannot answer queries that require
reasoning - but a reasoner can be exposed as a SPARQL
service.
RDF
SPARQLservice
Reasoner
RDF
SPARQLservice
53More expressive power 1/3
- RDFS is a light ontological language that allows
for defining simple vocabularies. - One may want also express
- Cardinality constrains (max, min, exactly) for
properties usage - Es. a Polygon has 3 or more edges
- ?x Polygon(x) ? 3y Edge(y) ? Forms(y,x)
- Property types
- transitive
- e.g. hasAncestor is a transitive property if A
hasAncestor B and B hasAncestor C, then A
hasAncestor C. - ?x ?y ?z HasAncestor(x,y) ? HasAncestor(y,z) ?
HasAncestor(x,z) - inverse
- e.g. sclupts has isSculptedBy as inverse
propertyif A sclupts B then B isSculptedBy A - ?x ?y Sculpts(x,y) ? IsSculptedBy(y,x)
54More expressive power 2/3
- simmetric
- e.g. isCloseTo is a simmetric property if A
isCloseTo B then B isCloseTo A - ?x ?y IsCloseTo(x,y) ? IsCloseTo(y,x)
- Restrictions of usage for a specific property
- All values of property must be of a certain kind
- e.g. a D.O.C. Wine can be only produced by a
Certified Wienery - ?x ?y DOCWine(x) ? Produces(x,y) ?
CertifiedWienery(y) - Some values of property must be of a certain kind
- e.g. a Famous Painter must have painted some
Famous Painting - ?x FamousPainter(x) ? ?y FamousPaint(y) ?
IsPaintedBy(y,x) - A class is defined combining other classes
(union, intersection, negation, ...) - A white wine is a Wine and its color is white
- ?x Wine(x) ? White(x)
55More expressive power 3/3
- Two instances refers to the same real object
- The Boss and Bruce Springsteen are two names
for the same person - TheBoss BruceSpringsteen
- Two classes refers to the same set
- Painters in english and Pittori in italian
- ?x Painter(x) ? Pittore(x)
- Two properties refers to the same binary
relationship - Paints in english and Dipinge in italian
- ?x ?y Paints(x,y) ? Dipinge(x,y)
56Expressivity vs. Tractability
- The more an ontological language is expressive
the less is tractable - the Web Ontology Language (OWL) comes with
several profiles that offers different trade-offs
between expressivity and tractability.
57OWL 2 profiles
- OWL 1 defines only one fragment (OWL Lite)
- And it isnt very tractable!
- OWL 2 defines several different fragments with
- Useful computational properties
- E.g., reasoning complexity in range LOGSPACE to
PTIME - Useful implementation possibilities
- E.g., Smaller fragments implementable using RDBs
- OWL 2 profiles
- OWL 2 EL, OWL 2 QL, OWL 2 RL
58OWL 2 EL
- Useful for applications employing ontologies that
contain very - large number of properties and/or classes
- Captures expressive power used by many
large-scaleontologies E.g. SNOMED CT, NCI
thesaurus - Features
- Included existential restrictions, intersection,
subClass,equivalentClass, disjointness, range and
domain, object property inclusion possibly
involving property chains, and data property
inclusion, transitive properties, keys - Missing include value restrictions, Cardinality
restrictions (min, max and exact), disjunction
and negation - Maximal language for which reasoning (including
query answering) known to be worst-case polynomial
59OWL 2 QL
- Useful for applications that use very large
volumes of data, and where query answering is the
most important task - Captures expressive power of simple ontologies
like thesauri, classifications, and (most of)
expressive power of ER/UML schemas - E.g., CIM10, Thesaurus of Nephrology, ...
- Features
- Included limited form of existential
restrictions, subClass, equivalentClass,
disjointness, range domain, symmetric
properties, - Missing existential quantification to a class,
self restriction, nominals, universal
quantification to a class, disjunction etc. - Can be implemented on top of standard relational
DBMS - Maximal language for which reasoning (including
query answering) is known to be worst case
logspace (same as DB)
60OWL 2 RL
- Useful for applications that require scalable
reasoning without sacrifying too much expressive
power, and where query answering is the most
important task - Support most OWL features but
- with restrictions placed on the syntax of OWL 2
- standard semantics only apply when they are used
in a restricted way - Can be implemented on top of rule extended DBMS
- E.g., Oracles OWL Prime implemented using
forward chaining rules in Oracle 11g - Related to DLP and pD
- Allows for scalable (polynomial) reasoning using
rule-based technologies
61Application
62Light weight semantic mark-up
ltdiv id"event-info-where" class"info-wh-info
vcard"gt lth2gtlta rel"bookmark" class"fn org
location" href"/venues/V0-001-00
0693919-2"gt Circus Krone
Munichlt/agtlt/h2gt ltdiv class"adr"gt
ltspan class"street-address"gt1lt/spangtltbrgt
ltspan class"locality"gtMunichlt/spangt,
ltspan class"region"gtBayernlt/spangt ltbrgt
ltspan class"country-name"gtGermanylt/spangt
- A firefox plug-in such as Operator can extract
those semantic mark-up from the page and offers
actions such as add the event to your calendar - https//addons.mozilla.org/en-US/firefox/addon/410
6
63Linking Open Data Project
- Goal extend the Web with data commons by
publishing open data sets using Semantic Web techs
- Project Chartres
- RDFizers and ConverterToRdf
- Publishing Tools
- Semantic Web Browsers and Client Libraries
- Semantic Web Search Engines
- Applications
Visit http//esw.w3.org/topic/SweoIG/TaskForces/C
ommunityProjects/LinkingOpenData !
64Navigating the Semantic Web
- Use a Semantic Web search engine to enter into it
- E.g., sindice http//sindice.com/
- Search for something (e.g., Varese)
- Click and browse
- NOTE Its meant for machine consumption!
65The new era of Semantic Apps
- One of the highlights of October's Web 2.0 Summit
in San Francisco was the emergence of 'Semantic
Apps' as a force. - The purpose of this post is to highlight 10
Semantic Apps. It reflects the nascent status
of this sector, even though people like Hillis
and Spivack have been working on their apps for
years now.
- Read out more at http//www.readwriteweb.com/archi
ves/10_semantic_apps_to_watch.php
66Esempi di applicazioni
- Allen Brain Atlas Gene Expression Results
- http//sw.neurocommons.org/hcls_gene_image.html
- SWEOs use case collection
- http//www.w3.org/2001/sw/sweo/public/UseCases/
- Linking Open Data Project
- http//esw.w3.org/topic/SweoIG/TaskForces/Communit
yProjects/LinkingOpenData - Music Event Explorer
- http//meex.cefriel.it/meex/
67Music Event Explorer
- Esigenza dove posso andare a sentire musica folk
nei prossimi giorni? - Soluzione manuale
- Vado su musicmoz e scopro i cantanti che fanno
musica folk - Vado su musicbrainz e guardo quali album hanno
pubblicato - Per ciascuno di quelli che mi piace cerco su EVDB
se ci ha organizzato eventi nei prossimi giorni - Mi appunto i posti e poi li cerco in GoogleMaps
68Soluzione manuale
- Vado su musicmoz e scopro i cantanti che fanno
musica folk
69Soluzione manuale
- Vado su musicbrainz e guardo quali album hanno
pubblicato
70Soluzione manuale
- Per ciascuno di quelli che mi piace cerco su EVDB
se ci ha organizzato eventi nei prossimi giorni
71Soluzione manuale
- Mi appunto i posti e poi li cerco in GoogleMaps
72Music Event Explorer
- Una soluzione poco praticabile
- ma automatizzabile
73http//meex.cefriel.it/meex