SlideShare una empresa de Scribd logo
1 de 44
Descargar para leer sin conexión
Semantic Web
Dr. Sebastian Ryszard Kruk

Dec 11th, 2012; Web Tuesday, Zurich
Outline

✤   Quick walk through the history of the Web

✤   The core principles of the Semantic Web

✤   Some vocabularies, schemas and ontologies you should know

✤   Publishing the Web 3.0 way

✤   Consuming semantics

✤   Semantic Web gotchas

✤   Summary: how Semantic Web technologies can help
The history of the Web
Let’s go back in time

✤   1937 - H.G. Wells: “World Brain”
✤   1945 - Vannevar Bush: Memex
✤   1969 - Doug Engelbart: ARPANET, online collaboration, mouse
✤   1989 - sir Tim Berners-Lee: WWW
✤   1995 - Dublin Core: semantics from librarian world
✤   1999 - prof. Stefan Decker: OntoBroker
✤   2000 - DARPA publish DAML specification
✤   2001 - TBL, Handler i Lassila: “The Semantic Web” (SciAm)
✤   2009 - TBL - 20th anniversary: “we’ve got all the tools"
✤   2009 - Google introduces Rich Snippets/RDFa; BestBuy sales
    increase
✤   2010 - Facebook starts Open Graph
✤   2012 - Google announces Knowledge Graph
The blueprints of the Web
The core principles
The “roadmap” cake
RDF is not a format!
RDF is not a format!
        Leather                           made by

 Wood                                     Chair
                                   is a             made


           made of                                               is a

                                                           Carpenter
                                                                           Man
                                          sits on
                                                                        is a
              has
 Back

 Leg
            count       used for

                    4               Sitting
RDF is not a format!
        Leather                           made by

 Wood                                     Chair
                                   is a             made
                             predicate
              subject
           made of                                     object    is a

                                                           Carpenter
                             a statement                                   Man
                                          sits on
                                                                        is a
              has
 Back

 Leg
            count       used for

                    4               Sitting
Resource, Literals and BNodes

✤   Resource - everything identified by URI/IRI

✤   Literal - a value (“four”)

    ✤   with an optional type (4^^xsd:int)

    ✤   or optional lang tag (“four”@en)

✤   BNode - point in the graph with only local _:name

✤   Statement - a triple (subject, predicate, object)

✤   Reification - a statement about the statement
Resource, Literals and BNodes

✤   Resource - everything identified by URI/IRI

✤   Literalns: a value (“four”)
            - <http://test.test/ns> .
     @prefix
     @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
     @prefix xsd: <http://www.w3.org/2001/XMLSchema> .
    ✤   with an optional type (4^^xsd:int)
     ns:Chair ns:has ns:Leg.

     _:sentence a rdf:Statement; tag (“four”@en)
        or optional lang
    ✤

              rdf:subject ns:Chair;
              rdf:predicate ns:has;
✤   BNoderdf:object ns:Leg;the graph with only
                - point in                                 local _:name
              ns:count “4”^^xsd:int.

✤   Statement - a triple (subject, predicate, object)

✤   Reification - a statement about the statement
Vocabularies

✤   Schemes:

    ✤   Taxonomy: narrower/broader

    ✤   Thesaurus: related

    ✤   Folksonomy: “machines are (using) us” Peter Mika [Yahoo]

✤   Ontology: “An ontology is a specification of a conceptualization” Tom
    Gruber, 1993 [*Siri]
Ontology languages


✤   RDF Schema: classes, properties, domains and ranges

✤   OWL (Web Ontology Language) - Lite, DL and Full, and OWL 2: (among
    others) inverse functional property, symmetry, transitiveness and
    disjointness

✤   But also: UML, ERD, ...
Vocabularies and ontologies
Dublin Core

✤   One of the oldest, originates from digital libraries

✤   Goals:

    ✤   semantic and syntactic interoperability

    ✤   shareable descriptions, vocabularies and constrains

✤   Defines:

    ✤   15 basic concepts, such as dc:title, dc:creator

    ✤   Additional classes and concepts in DC Qualifiers
FOAF+SIOC+SKOS




                 http://sioc-project.org
Good Relations

✤   De-facto standard for semantic e-commerce
    ✤   Supported by Google via Rich Snippets
    ✤   BestBuy showed how to increase revenue with it
    ✤   Part of the schema.org specification
✤   Example information:
    ✤   the geo-location of the store
    ✤   the countries the store ships to
    ✤   the payment options the ship accepts
✤   Distribute, open “Amazon”
schema.org



✤   Vocabulary for Rich Snippets and Knowledge Graph

✤   Yahoo+Bing+Google

✤   Microdata vs RDFa (Lite)
Publishing semantics
Linked (Open) Data




  http://linkeddata.org
5-Star Data Rules

✤   URIs = names for things

✤   HTTP URIs = enable look up

✤   Provide useful information
    upon lookup, using the
    standards (RDF*, SPARQL)

✤   Link to other URIs = enable
    discovery of more things.

                                  http://www.w3.org/DesignIssues/LinkedData.html
5-Star Data Rules

✤   URIs = names for things

✤   HTTP URIs = enable look up

✤   Provide useful information
    upon lookup, using the
    standards (RDF*, SPARQL)

✤   Link to other URIs = enable
    discovery of more things.

                                  http://www.w3.org/DesignIssues/LinkedData.html
Content negotiation
RDFa and RDFa Lite

✤   Extension to XHTML/HTML5 for embeding RDF graph semantics in
    HTML syntax:

    ✤   property vs rel

    ✤   resource vs about

    ✤   typeof

    ✤   vocab, prefix
RDFa and RDFa Lite

✤   Extension to XHTML/HTML5 for embeding RDF graph semantics in
    HTML syntax:
    <p vocab="http://schema.org/"
        property vs rel
     ✤ prefix="ov: http://open.vocab.org/terms/"
       resource="#skruk"
       typeof="Person">
       My name is <span property="name">Sebastian Kruk</span>
     ✤  resource vs about
       and you can give me a ring via
       <span property="telephone">+41-78-87-961-89</span>.
       <img property="image" src="http://bit.ly/QAYF10" />
       My favorite animal is the <span property="ov:preferredAnimal">Hamster</span>.
     ✤
    </p>typeof

    ✤   vocab, prefix
Rich Snippets (microdata)

<div class="col-right small" itemid="http://example/" itemtype="http://schema.org/
FurnitureStore">
 <ul class="list"><li><div itemprop="address" itemscope="" itemtype="http://schema.org/
PostalAddress">
  <p>
   <span itemprop="postalCode">5210</span> <span itemprop="addressLocality">Windisch</
span><br>
   <span itemprop="addressCountry">Switzerland</span><br>
  </p>
  <p>
   <a class="email" href="mailto:windisch@kruk.me" itemprop="email">windisch@kruk.me</a>
   <span itemprop="telephone">+41788796189</span><br>
  </p>
 </div></li></ul>
Rich Snippets (RDFa Lite)
<div class="col-right small" resource="http://example.com/" typeof="FurnitureStore"
vocab="http://schema.org/">
 <ul class="list"><li><div property="address" typeof="PostalAddress">
  <p>
   <span property="postalCode">5210</span> <span property="addressLocality">Windisch</
span><br>
   <span property="addressCountry">Switzerland</span><br>
  </p>
  <p>
   <a class="email" href="mailto:windisch@kruk.me" property="email">windisch@kruk.me</a>
   <span property="telephone">+41788796189</span><br>
  </p>
 </div></li></ul>
</div>
Consuming semantics
SPARQL



✤   W3C standard for querying RDF graphs

✤   Purposely made similar to SQL (to the extent possible)

✤   SPARQL endpoint: a standard way to expose (open) data published
    by the service
Path queries



✤   ?a :d “D”.

✤   ?a :a ?b. ?b :e “E”; :f “F”.

✤   ?a :b [ :c “C” ].
Path queries


                                             :c
                                                  C
                                   :b
✤   ?a :d “D”.
                                        :a        :e
                                   ?a        ?b        E
✤   ?a :a ?b. ?b :e “E”; :f “F”.
                                   :d             :f
✤   ?a :b [ :c “C” ].
                                        D         F
SELECT and more

✤   PREFIX dc: <http://purl.org/dc/elements/1.1/>

✤   SELECT ?title
    WHERE { <http://mybook.com> dc:title ?title.}

✤   CONSTRUCT { ?b ns:isKnownBy ?a }
    WHERE { ?a foaf:knows ?b }

✤   ASK { <http://kruk.me/> foaf:knows ?c }

✤   DESCRIBE ?a
    WHERE { ?a foaf:knows <http://kruk.me> }
SPARQL Filtering


✤   OPTIONAL { ?x ns:y ?z }

✤   FILTER ( xsd:dateTime(?date) >
    xsd:dateTime("2010-03-01T00:00:00Z") )

✤   FILTER regex( ?value, "This is a S+", "i" )

✤   isURI/isIRI, isBlank, isLiteral, sameTerm, langMatches

✤   str, lang, datatype
Python RDFLib

from rdflib.graph import Graph, URIRef
from rdflib.namespace import Namespace
from rdflib import plugin

plugin.register('sparql', rdflib.query.Processor,
               'rdfextras.sparql.processor', 'Processor')
plugin.register('sparql', rdflib.query.Result,
               'rdfextras.sparql.query', 'SPARQLQueryResult')
plugin.register('turtle', rdflib.serializer.Serializer,
               'rdflib.plugins.serializers.turtle', 'TurtleSerializer')
namespaces = { 'skos' : Namespace('http://www.w3.org/2004/02/skos/core#'), }

def list_friends(f_name, uri):
    g = Graph()
    g.parse(f_name, format="n3")

   query = "SELECT ?fn WHERE { ?f foaf:knows <%s>; foaf:name ?fn. }" % uri
   return [ f for f in g.query(query, initNs=namespaces) ]
Read RDFa into RDF



from pyRdfa import pyRdfa, Options

def rdf2turtle(url):
       options = Options(output_processor_graph=True)
       turtle = pyRdfa(options=options).rdf_from_source(url, outputFormat='turtle')
       return turtle
Gotchas
Don’t overcomplicate


✤   Gödel’s Incompleteness Theorems

✤   First-Order Logic vs OWL-Full / CYC

✤   Jim Handler: “Little semantics go a long way”

✤   Folksonomies
OOP vs Description Logic


✤   B rdfs:subClassOf A
    C rdfs:domain A
    D rdfs:domain B

✤   Infers:

    ✤   C rdfs:domain B [WRONG!]

    ✤   D rdfs:domain A [OK]
OOP vs Description Logic


✤   B rdfs:subClassOf A
    C rdfs:domain A
    D rdfs:domain B                                 domain
                                            A                C
✤   Infers:                        subClassOf
                                                    domain
                                                B            D
    ✤   C rdfs:domain B [WRONG!]

    ✤   D rdfs:domain A [OK]
Open World Assumptions


✤   RDF is by it’s virtue a distributed being

    ✤   You might only have a part of it

    ✤   The rest is on Linked Data

✤   Unlike in the close world assumption reasoning, if there is no
    statement “Sebastian isFrom Poland” it does not mean, I am not.
RDBMS and NoSQL vs RDF



✤   We can store RDF in RDBMS; even easier in NoSQL

✤   Certain SPARQL path queries can be translated to SQL

✤   Usually no joint queries NoSQL ➡ DIY path querying
How can web semantics help


✤   interoperability

✤   information retrieval

✤   recommendations and matchmaking

✤   SEO
Linked Data is King
Dr. Sebastian Ryszard Kruk

CTO/CRO Knowledge Hives sp. z o.o., sebastian@kruk.me

Más contenido relacionado

La actualidad más candente

NISO/DCMI September 25 Webinar: Implementing Linked Data in Developing Countr...
NISO/DCMI September 25 Webinar: Implementing Linked Data in Developing Countr...NISO/DCMI September 25 Webinar: Implementing Linked Data in Developing Countr...
NISO/DCMI September 25 Webinar: Implementing Linked Data in Developing Countr...
National Information Standards Organization (NISO)
 
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
National Information Standards Organization (NISO)
 
Lecture linked data cloud & sparql
Lecture linked data cloud & sparqlLecture linked data cloud & sparql
Lecture linked data cloud & sparql
Dhavalkumar Thakker
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic  Web and Linked DataAn introduction to Semantic  Web and Linked Data
An introduction to Semantic Web and Linked Data
Gabriela Agustini
 
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
National Information Standards Organization (NISO)
 

La actualidad más candente (20)

JeromeDL - the Semantic Digital Library
JeromeDL - the Semantic Digital LibraryJeromeDL - the Semantic Digital Library
JeromeDL - the Semantic Digital Library
 
Development of Semantic Web based Disaster Management System
Development of Semantic Web based Disaster Management SystemDevelopment of Semantic Web based Disaster Management System
Development of Semantic Web based Disaster Management System
 
Better Search With Structured Knowledge
Better Search With Structured KnowledgeBetter Search With Structured Knowledge
Better Search With Structured Knowledge
 
General Introduction for Semantic Web and Linked Open Data
General Introduction for Semantic Web and Linked Open DataGeneral Introduction for Semantic Web and Linked Open Data
General Introduction for Semantic Web and Linked Open Data
 
semantic web & natural language
semantic web & natural languagesemantic web & natural language
semantic web & natural language
 
SDA2013 Pundit: Creating, Exploring and Consuming Annotations
SDA2013 Pundit: Creating, Exploring and Consuming AnnotationsSDA2013 Pundit: Creating, Exploring and Consuming Annotations
SDA2013 Pundit: Creating, Exploring and Consuming Annotations
 
Introduction to the Semantic Web
Introduction to the Semantic WebIntroduction to the Semantic Web
Introduction to the Semantic Web
 
Porting Library Vocabularies to the Semantic Web - IFLA 2010
Porting Library Vocabularies to the Semantic Web - IFLA 2010Porting Library Vocabularies to the Semantic Web - IFLA 2010
Porting Library Vocabularies to the Semantic Web - IFLA 2010
 
NISO/DCMI Webinar: Schema.org and Linked Data: Complementary Approaches to Pu...
NISO/DCMI Webinar: Schema.org and Linked Data: Complementary Approaches to Pu...NISO/DCMI Webinar: Schema.org and Linked Data: Complementary Approaches to Pu...
NISO/DCMI Webinar: Schema.org and Linked Data: Complementary Approaches to Pu...
 
Semantic web
Semantic web Semantic web
Semantic web
 
NISO/DCMI September 25 Webinar: Implementing Linked Data in Developing Countr...
NISO/DCMI September 25 Webinar: Implementing Linked Data in Developing Countr...NISO/DCMI September 25 Webinar: Implementing Linked Data in Developing Countr...
NISO/DCMI September 25 Webinar: Implementing Linked Data in Developing Countr...
 
Metadata Training for Staff and Librarians for the New Data Environment
Metadata Training for Staff and Librarians for the New Data EnvironmentMetadata Training for Staff and Librarians for the New Data Environment
Metadata Training for Staff and Librarians for the New Data Environment
 
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
 
06 gioca-ontologies
06 gioca-ontologies06 gioca-ontologies
06 gioca-ontologies
 
Lecture linked data cloud & sparql
Lecture linked data cloud & sparqlLecture linked data cloud & sparql
Lecture linked data cloud & sparql
 
NISO/DCMI May 22 Webinar: Semantic Mashups Across Large, Heterogeneous Insti...
 NISO/DCMI May 22 Webinar: Semantic Mashups Across Large, Heterogeneous Insti... NISO/DCMI May 22 Webinar: Semantic Mashups Across Large, Heterogeneous Insti...
NISO/DCMI May 22 Webinar: Semantic Mashups Across Large, Heterogeneous Insti...
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic  Web and Linked DataAn introduction to Semantic  Web and Linked Data
An introduction to Semantic Web and Linked Data
 
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
 
NISO DCMI Webinar bibframe-20130123
NISO DCMI Webinar bibframe-20130123NISO DCMI Webinar bibframe-20130123
NISO DCMI Webinar bibframe-20130123
 
Linked Data Tutorial
Linked Data TutorialLinked Data Tutorial
Linked Data Tutorial
 

Similar a Semantic Web

2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
Josef Petrák
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Justin Smestad
 
The openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageThe openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query Language
Neo4j
 
CouchDB Open Source Bridge
CouchDB Open Source BridgeCouchDB Open Source Bridge
CouchDB Open Source Bridge
Chris Anderson
 

Similar a Semantic Web (20)

2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
 
Exploring the Semantic Web
Exploring the Semantic WebExploring the Semantic Web
Exploring the Semantic Web
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 Flow
 
A Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsA Little SPARQL in your Analytics
A Little SPARQL in your Analytics
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
RDFa: introduction, comparison with microdata and microformats and how to use it
RDFa: introduction, comparison with microdata and microformats and how to use itRDFa: introduction, comparison with microdata and microformats and how to use it
RDFa: introduction, comparison with microdata and microformats and how to use it
 
Important work-arounds for making ASS multi-lingual
Important work-arounds for making ASS multi-lingualImportant work-arounds for making ASS multi-lingual
Important work-arounds for making ASS multi-lingual
 
The openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageThe openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query Language
 
Schema.org: What It Means For You and Your Library
Schema.org: What It Means For You and Your LibrarySchema.org: What It Means For You and Your Library
Schema.org: What It Means For You and Your Library
 
CouchDB Open Source Bridge
CouchDB Open Source BridgeCouchDB Open Source Bridge
CouchDB Open Source Bridge
 
The design, architecture, and tradeoffs of FluidDB
The design, architecture, and tradeoffs of FluidDBThe design, architecture, and tradeoffs of FluidDB
The design, architecture, and tradeoffs of FluidDB
 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
 
Lifting the Lid on Linked Data
Lifting the Lid on Linked DataLifting the Lid on Linked Data
Lifting the Lid on Linked Data
 
Text mining and Visualizations
Text mining  and VisualizationsText mining  and Visualizations
Text mining and Visualizations
 
2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDF2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDF
 
Xephon K A Time series database with multiple backends
Xephon K A Time series database with multiple backendsXephon K A Time series database with multiple backends
Xephon K A Time series database with multiple backends
 
Couchdb Nosql
Couchdb NosqlCouchdb Nosql
Couchdb Nosql
 
The Semantic Web #4 - RDF (1)
The Semantic Web #4 - RDF (1)The Semantic Web #4 - RDF (1)
The Semantic Web #4 - RDF (1)
 
Beautiful REST and JSON APIs - Les Hazlewood
Beautiful REST and JSON APIs - Les HazlewoodBeautiful REST and JSON APIs - Les Hazlewood
Beautiful REST and JSON APIs - Les Hazlewood
 
ontology.ppt
ontology.pptontology.ppt
ontology.ppt
 

Más de Sebastian Ryszard Kruk

Más de Sebastian Ryszard Kruk (19)

Sieć Semantyczna w teorii i praktyce
Sieć Semantyczna w teorii i praktyceSieć Semantyczna w teorii i praktyce
Sieć Semantyczna w teorii i praktyce
 
Web 3.0 w teorii i praktyce
Web 3.0 w teorii i praktyceWeb 3.0 w teorii i praktyce
Web 3.0 w teorii i praktyce
 
JeromeDL - Semantic Digital Library
JeromeDL - Semantic Digital LibraryJeromeDL - Semantic Digital Library
JeromeDL - Semantic Digital Library
 
Knowledge Management with Web 3.0
Knowledge Management with Web 3.0 Knowledge Management with Web 3.0
Knowledge Management with Web 3.0
 
węzełki.pl - knowledge sharing portal on Web 3.0
węzełki.pl - knowledge sharing portal on Web 3.0węzełki.pl - knowledge sharing portal on Web 3.0
węzełki.pl - knowledge sharing portal on Web 3.0
 
Ecdl2008 Jeromedl Evaluation Long
Ecdl2008 Jeromedl Evaluation LongEcdl2008 Jeromedl Evaluation Long
Ecdl2008 Jeromedl Evaluation Long
 
Rendering Navigation and Information Space with HoneyCombTM
Rendering Navigation and Information Space  with  HoneyCombTMRendering Navigation and Information Space  with  HoneyCombTM
Rendering Navigation and Information Space with HoneyCombTM
 
Building Heterogeneous Networks of Digital Libraries on the Semantic Web
Building Heterogeneous Networks of Digital Libraries on the Semantic WebBuilding Heterogeneous Networks of Digital Libraries on the Semantic Web
Building Heterogeneous Networks of Digital Libraries on the Semantic Web
 
MultiBeeBrowse - Accessible Browsing on Unstructured Metadata
MultiBeeBrowse - Accessible Browsing on Unstructured Metadata  MultiBeeBrowse - Accessible Browsing on Unstructured Metadata
MultiBeeBrowse - Accessible Browsing on Unstructured Metadata
 
JeromeDL Tutorial
JeromeDL TutorialJeromeDL Tutorial
JeromeDL Tutorial
 
Role of Ontologies in Semantic Digital Libraries
Role of Ontologies in Semantic Digital LibrariesRole of Ontologies in Semantic Digital Libraries
Role of Ontologies in Semantic Digital Libraries
 
Search and Browsing Cycle for Knowledge Discovery and Learning
Search and Browsing Cycle for Knowledge Discovery and LearningSearch and Browsing Cycle for Knowledge Discovery and Learning
Search and Browsing Cycle for Knowledge Discovery and Learning
 
Semantic Web in Action
Semantic Web in ActionSemantic Web in Action
Semantic Web in Action
 
Irish Digital Libraries Summit
Irish Digital Libraries SummitIrish Digital Libraries Summit
Irish Digital Libraries Summit
 
Digital Libraries of the Future
Digital Libraries of the Future
Digital Libraries of the Future
Digital Libraries of the Future
 
Social Semantic Digital Libraries in a Nutshell
Social Semantic Digital Libraries in a NutshellSocial Semantic Digital Libraries in a Nutshell
Social Semantic Digital Libraries in a Nutshell
 
Social Semantic Search and Browsing
Social Semantic Search and BrowsingSocial Semantic Search and Browsing
Social Semantic Search and Browsing
 
Browsing Information with TreeMaps
Browsing Information with TreeMapsBrowsing Information with TreeMaps
Browsing Information with TreeMaps
 
Social Semantic Collaborative Filtering
Social Semantic Collaborative FilteringSocial Semantic Collaborative Filtering
Social Semantic Collaborative Filtering
 

Último

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Último (20)

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 

Semantic Web

  • 1. Semantic Web Dr. Sebastian Ryszard Kruk Dec 11th, 2012; Web Tuesday, Zurich
  • 2. Outline ✤ Quick walk through the history of the Web ✤ The core principles of the Semantic Web ✤ Some vocabularies, schemas and ontologies you should know ✤ Publishing the Web 3.0 way ✤ Consuming semantics ✤ Semantic Web gotchas ✤ Summary: how Semantic Web technologies can help
  • 3. The history of the Web
  • 4. Let’s go back in time ✤ 1937 - H.G. Wells: “World Brain” ✤ 1945 - Vannevar Bush: Memex ✤ 1969 - Doug Engelbart: ARPANET, online collaboration, mouse ✤ 1989 - sir Tim Berners-Lee: WWW ✤ 1995 - Dublin Core: semantics from librarian world ✤ 1999 - prof. Stefan Decker: OntoBroker ✤ 2000 - DARPA publish DAML specification ✤ 2001 - TBL, Handler i Lassila: “The Semantic Web” (SciAm) ✤ 2009 - TBL - 20th anniversary: “we’ve got all the tools" ✤ 2009 - Google introduces Rich Snippets/RDFa; BestBuy sales increase ✤ 2010 - Facebook starts Open Graph ✤ 2012 - Google announces Knowledge Graph
  • 8. RDF is not a format!
  • 9. RDF is not a format! Leather made by Wood Chair is a made made of is a Carpenter Man sits on is a has Back Leg count used for 4 Sitting
  • 10. RDF is not a format! Leather made by Wood Chair is a made predicate subject made of object is a Carpenter a statement Man sits on is a has Back Leg count used for 4 Sitting
  • 11. Resource, Literals and BNodes ✤ Resource - everything identified by URI/IRI ✤ Literal - a value (“four”) ✤ with an optional type (4^^xsd:int) ✤ or optional lang tag (“four”@en) ✤ BNode - point in the graph with only local _:name ✤ Statement - a triple (subject, predicate, object) ✤ Reification - a statement about the statement
  • 12. Resource, Literals and BNodes ✤ Resource - everything identified by URI/IRI ✤ Literalns: a value (“four”) - <http://test.test/ns> . @prefix @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema> . ✤ with an optional type (4^^xsd:int) ns:Chair ns:has ns:Leg. _:sentence a rdf:Statement; tag (“four”@en) or optional lang ✤ rdf:subject ns:Chair; rdf:predicate ns:has; ✤ BNoderdf:object ns:Leg;the graph with only - point in local _:name ns:count “4”^^xsd:int. ✤ Statement - a triple (subject, predicate, object) ✤ Reification - a statement about the statement
  • 13. Vocabularies ✤ Schemes: ✤ Taxonomy: narrower/broader ✤ Thesaurus: related ✤ Folksonomy: “machines are (using) us” Peter Mika [Yahoo] ✤ Ontology: “An ontology is a specification of a conceptualization” Tom Gruber, 1993 [*Siri]
  • 14. Ontology languages ✤ RDF Schema: classes, properties, domains and ranges ✤ OWL (Web Ontology Language) - Lite, DL and Full, and OWL 2: (among others) inverse functional property, symmetry, transitiveness and disjointness ✤ But also: UML, ERD, ...
  • 16. Dublin Core ✤ One of the oldest, originates from digital libraries ✤ Goals: ✤ semantic and syntactic interoperability ✤ shareable descriptions, vocabularies and constrains ✤ Defines: ✤ 15 basic concepts, such as dc:title, dc:creator ✤ Additional classes and concepts in DC Qualifiers
  • 17. FOAF+SIOC+SKOS http://sioc-project.org
  • 18. Good Relations ✤ De-facto standard for semantic e-commerce ✤ Supported by Google via Rich Snippets ✤ BestBuy showed how to increase revenue with it ✤ Part of the schema.org specification ✤ Example information: ✤ the geo-location of the store ✤ the countries the store ships to ✤ the payment options the ship accepts ✤ Distribute, open “Amazon”
  • 19. schema.org ✤ Vocabulary for Rich Snippets and Knowledge Graph ✤ Yahoo+Bing+Google ✤ Microdata vs RDFa (Lite)
  • 21. Linked (Open) Data http://linkeddata.org
  • 22. 5-Star Data Rules ✤ URIs = names for things ✤ HTTP URIs = enable look up ✤ Provide useful information upon lookup, using the standards (RDF*, SPARQL) ✤ Link to other URIs = enable discovery of more things. http://www.w3.org/DesignIssues/LinkedData.html
  • 23. 5-Star Data Rules ✤ URIs = names for things ✤ HTTP URIs = enable look up ✤ Provide useful information upon lookup, using the standards (RDF*, SPARQL) ✤ Link to other URIs = enable discovery of more things. http://www.w3.org/DesignIssues/LinkedData.html
  • 25. RDFa and RDFa Lite ✤ Extension to XHTML/HTML5 for embeding RDF graph semantics in HTML syntax: ✤ property vs rel ✤ resource vs about ✤ typeof ✤ vocab, prefix
  • 26. RDFa and RDFa Lite ✤ Extension to XHTML/HTML5 for embeding RDF graph semantics in HTML syntax: <p vocab="http://schema.org/" property vs rel ✤ prefix="ov: http://open.vocab.org/terms/" resource="#skruk" typeof="Person"> My name is <span property="name">Sebastian Kruk</span> ✤ resource vs about and you can give me a ring via <span property="telephone">+41-78-87-961-89</span>. <img property="image" src="http://bit.ly/QAYF10" /> My favorite animal is the <span property="ov:preferredAnimal">Hamster</span>. ✤ </p>typeof ✤ vocab, prefix
  • 27. Rich Snippets (microdata) <div class="col-right small" itemid="http://example/" itemtype="http://schema.org/ FurnitureStore"> <ul class="list"><li><div itemprop="address" itemscope="" itemtype="http://schema.org/ PostalAddress"> <p> <span itemprop="postalCode">5210</span> <span itemprop="addressLocality">Windisch</ span><br> <span itemprop="addressCountry">Switzerland</span><br> </p> <p> <a class="email" href="mailto:windisch@kruk.me" itemprop="email">windisch@kruk.me</a> <span itemprop="telephone">+41788796189</span><br> </p> </div></li></ul>
  • 28. Rich Snippets (RDFa Lite) <div class="col-right small" resource="http://example.com/" typeof="FurnitureStore" vocab="http://schema.org/"> <ul class="list"><li><div property="address" typeof="PostalAddress"> <p> <span property="postalCode">5210</span> <span property="addressLocality">Windisch</ span><br> <span property="addressCountry">Switzerland</span><br> </p> <p> <a class="email" href="mailto:windisch@kruk.me" property="email">windisch@kruk.me</a> <span property="telephone">+41788796189</span><br> </p> </div></li></ul> </div>
  • 30. SPARQL ✤ W3C standard for querying RDF graphs ✤ Purposely made similar to SQL (to the extent possible) ✤ SPARQL endpoint: a standard way to expose (open) data published by the service
  • 31. Path queries ✤ ?a :d “D”. ✤ ?a :a ?b. ?b :e “E”; :f “F”. ✤ ?a :b [ :c “C” ].
  • 32. Path queries :c C :b ✤ ?a :d “D”. :a :e ?a ?b E ✤ ?a :a ?b. ?b :e “E”; :f “F”. :d :f ✤ ?a :b [ :c “C” ]. D F
  • 33. SELECT and more ✤ PREFIX dc: <http://purl.org/dc/elements/1.1/> ✤ SELECT ?title WHERE { <http://mybook.com> dc:title ?title.} ✤ CONSTRUCT { ?b ns:isKnownBy ?a } WHERE { ?a foaf:knows ?b } ✤ ASK { <http://kruk.me/> foaf:knows ?c } ✤ DESCRIBE ?a WHERE { ?a foaf:knows <http://kruk.me> }
  • 34. SPARQL Filtering ✤ OPTIONAL { ?x ns:y ?z } ✤ FILTER ( xsd:dateTime(?date) > xsd:dateTime("2010-03-01T00:00:00Z") ) ✤ FILTER regex( ?value, "This is a S+", "i" ) ✤ isURI/isIRI, isBlank, isLiteral, sameTerm, langMatches ✤ str, lang, datatype
  • 35. Python RDFLib from rdflib.graph import Graph, URIRef from rdflib.namespace import Namespace from rdflib import plugin plugin.register('sparql', rdflib.query.Processor, 'rdfextras.sparql.processor', 'Processor') plugin.register('sparql', rdflib.query.Result, 'rdfextras.sparql.query', 'SPARQLQueryResult') plugin.register('turtle', rdflib.serializer.Serializer, 'rdflib.plugins.serializers.turtle', 'TurtleSerializer') namespaces = { 'skos' : Namespace('http://www.w3.org/2004/02/skos/core#'), } def list_friends(f_name, uri): g = Graph() g.parse(f_name, format="n3") query = "SELECT ?fn WHERE { ?f foaf:knows <%s>; foaf:name ?fn. }" % uri return [ f for f in g.query(query, initNs=namespaces) ]
  • 36. Read RDFa into RDF from pyRdfa import pyRdfa, Options def rdf2turtle(url): options = Options(output_processor_graph=True) turtle = pyRdfa(options=options).rdf_from_source(url, outputFormat='turtle') return turtle
  • 38. Don’t overcomplicate ✤ Gödel’s Incompleteness Theorems ✤ First-Order Logic vs OWL-Full / CYC ✤ Jim Handler: “Little semantics go a long way” ✤ Folksonomies
  • 39. OOP vs Description Logic ✤ B rdfs:subClassOf A C rdfs:domain A D rdfs:domain B ✤ Infers: ✤ C rdfs:domain B [WRONG!] ✤ D rdfs:domain A [OK]
  • 40. OOP vs Description Logic ✤ B rdfs:subClassOf A C rdfs:domain A D rdfs:domain B domain A C ✤ Infers: subClassOf domain B D ✤ C rdfs:domain B [WRONG!] ✤ D rdfs:domain A [OK]
  • 41. Open World Assumptions ✤ RDF is by it’s virtue a distributed being ✤ You might only have a part of it ✤ The rest is on Linked Data ✤ Unlike in the close world assumption reasoning, if there is no statement “Sebastian isFrom Poland” it does not mean, I am not.
  • 42. RDBMS and NoSQL vs RDF ✤ We can store RDF in RDBMS; even easier in NoSQL ✤ Certain SPARQL path queries can be translated to SQL ✤ Usually no joint queries NoSQL ➡ DIY path querying
  • 43. How can web semantics help ✤ interoperability ✤ information retrieval ✤ recommendations and matchmaking ✤ SEO
  • 44. Linked Data is King Dr. Sebastian Ryszard Kruk CTO/CRO Knowledge Hives sp. z o.o., sebastian@kruk.me