semantic web technologies for hci
DESCRIPTION
Semantic web technologies pop up frequently in current computer science research, in particular in fields related to HCI. Although the semantic web itself has not yet been fully realized, the supporting technologies are mature enough to be used for other applications.The semantic web initiative centers around knowledge representation and automated reasoning about knowledge. This concept is general enough to find its use in many different fields (ambient intelligence, service oriented computing, etc.).I will give an overview of the basic concepts of the semantic web. Important semantic web standards such as RDF, RDFS and OWL will be covered as well.Presented during a HCI chit-chat session at our institute on September 8th, 2006.TRANSCRIPT
Semantic Web Technologies for HCI
Expertise Centre for Digital MediaAffiliated with the Institute for BroadBand Technology
Hasselt University - transnationale Universiteit LimburgBelgium
Semantic Web Technologies for HCI
Expertise Centre for Digital MediaAffiliated with the Institute for BroadBand Technology
Hasselt University - transnationale Universiteit LimburgBelgium
Part I
Semantic Web?
A web of data.
Some history
Tim Berners-Lee
The aim would be to allow a place to be found for any information or reference which one felt was important, and a way of finding it afterwards.
Tim Berners-Lee1989
Tim Berners-Lee
The Web
Tim Berners-Lee2001
For the documents in our lives, everything is simple and smooth. But for data, we are still pre-Web.
Tim Berners-Lee
The Semantic Web
Tim Berners-Lee
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.
... in a nutshell
• support for databases
• better search engines
• not AI!
• smart data versus smart machines
A simple but powerful idea!
Information is maintained in a
structured form.
• statements
• describe some relationship between one thing and another
• standardized by W3C as RDF
Web Semantic Web
Building blocks
URIs
HTTP
HTML
URIs
HTTP
Web Semantic Web
Building blocks
URIs
HTTP
HTML
URIs
HTTP
RDF
To be able to discuss something, we must
first identify it.
• Uniform Resource Identifier (URI)
• decentralized to scale
• http://me.jozilla.net/
• http://purl.org/dc/terms/modified
• uuid:04b749bf-3bb2-4dba-934c-c92c56b709df
• tag:[email protected],2001-06-05:Taiko
• esl:SHA1:iQAAwUBO51bkD6DJL[...]szDxfckCE:someName
Some examples
URI versus URLUniform Resource
IdentifierUniform Resource
Locator
where to find a specific resource
Identifies Identifies
Locates
Quickly create a URI
1. Create web page that describes resource
2. This URL serves as the URI
e.g. http://jozilla.net/myPowerbook
HTTP
• protocol for operations on resources
• GET
• POST
• PUT
HTTP
• protocol for operations on resources
• GET
• POST
• PUT
Ask info
HTTP
• protocol for operations on resources
• GET
• POST
• PUT
Send request
Ask info
HTTP
• protocol for operations on resources
• GET
• POST
• PUT
Send request
Ask info
Update
RDF
• Resource Description Format
• machine-processable
• statements
• triples
Pairs versus triples
Web
Semantic Web
(Microsoft, BillGates)
(Microsoft, employee, BillGates)
(subject, predicate, object)
link
link
Some examples
• <Jo> <hasName> “Jo Vermeulen” .
• <Jo> <knows> <Lode> .
• <Lode> <hasEmployer> <EDM> .
• <EDM> <site> <http://edm.uhasselt.be> .
• <primaryKey> <column_name> “value” .
RDF is a graph
JohasName
Jo Vermeulen
Lode EDM
knows
hasEmployer sitehttp://edm.uhasselt.be/
Why use RDF instead of XML?
• XML is about documents, not data
• attributes and entities cause problems with expressing data
• many ways to say the same thing in XML
• RDF is easy to put in relational database
• RDF is easy to merge
Ambiguity in XML<page> <hasAuthor> <Lode>
<author> <uri>page</uri> <name>Lode</name></author>
<person name=”Lode”> <work>page</work></person>
<document href=”http://www.perceptie.be/” author=”Lode”/>
But what about triple variations?
• new triple, saying that two URIs are equal
• RDF system will do find-and-replace
Different URIs?
Inverse?
<Lode> <authorOf> <page>
Conversion between RDF documents
Fairly easy, not like XSLT
RDF Syntax
• RDF/XML
• Notation 3 (N3)
• Turtle
Comparison<article> <dc:title> “Tony Benn”<article> <dc:publisher> “Wikipedia”
Comparison
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <rdf:Description rdf:about="http://en.wikipedia.org/wiki/Tony_Benn"> <dc:title>Tony Benn</dc:title> <dc:publisher>Wikipedia</dc:publisher> </rdf:Description></rdf:RDF>
<article> <dc:title> “Tony Benn”<article> <dc:publisher> “Wikipedia”
RDF/XML
Comparison<article> <dc:title> “Tony Benn”<article> <dc:publisher> “Wikipedia”
N3 or Turtle
@prefix dc: <http://purl.org/dc/elements/1.1/>.
<http://en.wikipedia.org/wiki/Tony_Benn> dc:title "Tony Benn"; dc:publisher "Wikipedia".
URIs + HTTP + RDF = ?
Semantic Web Services
Purchasing a book
Purchasing a book
GET
Purchasing a book<isbn:1588750019> <...title> “Travels with Samantha” .<isbn:1588750019> <...author> <...PhilipGreenspun> .<isbn:1588750019> <...pages> “368” .
Purchasing a book<isbn:1588750019> <...title> “Travels with Samantha” .<isbn:1588750019> <...author> <...PhilipGreenspun> .<isbn:1588750019> <...pages> “368” .
POST
Purchasing a book<isbn:1588750019> <...title> “Travels with Samantha” .<isbn:1588750019> <...author> <...PhilipGreenspun> .<isbn:1588750019> <...pages> “368” .
<Jo> <...wantsCopyOf> <isbn:1588750019> .<Jo> <...address> “Wetenschapspark 2”
Purchasing a book<isbn:1588750019> <...title> “Travels with Samantha” .<isbn:1588750019> <...author> <...PhilipGreenspun> .<isbn:1588750019> <...pages> “368” .
<Jo> <...wantsCopyOf> <isbn:1588750019> .<Jo> <...address> “Wetenschapspark 2”
PUT
Purchasing a book<isbn:1588750019> <...title> “Travels with Samantha” .<isbn:1588750019> <...author> <...PhilipGreenspun> .<isbn:1588750019> <...pages> “368” .
<Jo> <...wantsCopyOf> <isbn:1588750019> .<Jo> <...address> “Wetenschapspark 2”
<http://bookstore.org/reviews/2> <...title> “Cool” .<http://bookstore.org/reviews/2> <...author> <...George>.<isbn:1588750019> <...rating> “5” .<> <...contents> “I recommend this book to everyone!”
Why not use SOAP?
Why not use SOAP?<?xml version="1.0"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <ns:WhosOnlineResponse xmlns:ns="http://www.aduni.org/"> <user> <first_names xsi:type="xsd:string">Eve</first_names> <last_name xsi:type="xsd:string">Andersson</last_name> <email xsi:type="xsd:string">[email protected]</email> </user> </ns:WhosOnlineResponse> </SOAP-ENV:Body></SOAP-ENV:Envelope>
Why not use SOAP?
versus
Why not use SOAP?
@prefix : <http://www.aduni.org/rdf/> .@prefix u: <http://www.aduni.org/users/> .
u:1000 :type :User .u:1000 :firstName "Eve" .u:1000 :lastName "Andersson" .u:1000 :email "[email protected]" .
Furthermore ...
• SOAP is very verbose
• everyone can invent its own methods
• depends on things not changing
Existing services
• MusicBrainz
• music metadata
• Google Directory
• annotates OpenDirectory with PageRank
Who would trust such a system?
Security
• digital signatures
• sign RDF statements
• Web of Trust
Web of Trust
Jo
x
y
z
g
h
i
d
e
f
a
b
c
p
q
r
How do we know what a specific term means?
Book ratings<reallyLikes> rank 1-10
Book ratings<reallyLikes> rank 1-10
Schemas Ontologies
Book ratings<reallyLikes> rank 1-10
Schemas Ontologies
meaning and relationships
Book ratings<reallyLikes> rank 1-10
Schemas Ontologies
meaning and relationships
RDFS
Book ratings<reallyLikes> rank 1-10
Schemas Ontologies
meaning and relationships
RDFS OWL
Three layers
RDF
RDFS
OWL
Three layers
RDF
RDFS
Facts
OWL
Three layers
RDF
RDFS
Facts
Vocabularies
OWL
Three layers
RDF
RDFS
Facts
Vocabularies
Relationships between vocabulariesOWL
RDFS example
• resource X is a review
• resource Y is a special kind of review
Classes
Definition
Classes
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
rev:Review rdf:type rdfs:Class ; rdf:ID “Review” ;.
rev:ComparativeReview a rdfs:Class ; rdfs:subClassOf rev:Review .
Definition
Classes
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
rev:Review rdf:type rdfs:Class ; rdf:ID “Review” ;.
rev:ComparativeReview a rdfs:Class ; rdfs:subClassOf rev:Review .
Definition
Instantiation
Classes
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
rev:Review rdf:type rdfs:Class ; rdf:ID “Review” ;.
rev:ComparativeReview a rdfs:Class ; rdfs:subClassOf rev:Review .
<http://bookstore.org/rev1> rdf:type rev:Review .
Definition
Instantiation
Classes
Defining a subject property
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
rev:subject rdf:type rdf:Property; rdfs:label “Subject property” ; rdfs:domain rev:Review ; rdfs:range rdfs:Resource ; rdfs:comment “The resource being reviewed.”.
Defining a subject property
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
rev:subject rdf:type rdf:Property; rdfs:label “Subject property” ; rdfs:domain rev:Review ; rdfs:range rdfs:Resource ; rdfs:comment “The resource being reviewed.”.
Defining a subject property
XY
Z
(x, y, z)
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
rev:subject rdf:type rdf:Property; rdfs:label “Subject property” ; rdfs:domain rev:Review ; rdfs:range rdfs:Resource ; rdfs:comment “The resource being reviewed.”.
Defining a subject property
XY
Z
Domain
(x, y, z)
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
rev:subject rdf:type rdf:Property; rdfs:label “Subject property” ; rdfs:domain rev:Review ; rdfs:range rdfs:Resource ; rdfs:comment “The resource being reviewed.”.
Defining a subject property
XY
Z
Domain Range
(x, y, z)
With RDFS, we know ...
• which classes exist
• what their properties are
We don’t know ...
• when two classes are the same?
• whether properties can have multiple values?
• if X property Y and Y property Z; then
• X property Z? (transitivity)
• Y property X? (symmetry)
• Z property X?
OWL
OWL
Class definition
OWL
@prefix gen: <http://genealogy.example.com/schema#> .@prefix owl: <http://www.w3.org/2002/07/owl#> .
gen:Person a owl:class; rdf:ID “person” ; rdfs:comment “Resource representing a person.” ;.
Class definition
Defining an ancestor property
gen:ancestor a owl:TransitiveProperty; rdfs:domain gen:Person ; rdfs:range gen:Person ;.
Defining an ancestor property
gen:ancestor a owl:TransitiveProperty; rdfs:domain gen:Person ; rdfs:range gen:Person ;.
Defining an ancestor property
Specifying that a property is the inverse of another
gen:ancestor a owl:TransitiveProperty; rdfs:domain gen:Person ; rdfs:range gen:Person ;.
Defining an ancestor property
Specifying that a property is the inverse of another
dc:creator owl:inverseOf ed:hasAuthor .
<page> <hasAuthor> <Lode>
<page> <hasAuthor> <Lode>
<Lode> <authorOf> <page>
same as
<hasAuthor> owl:inverseOf <authorOf> .
<page> <hasAuthor> <Lode>
<Lode> <authorOf> <page>
same as
OWL allows us to ...
• indicate when two classes or properties are identical
• provide additional information for rule-checking and theorem proving
How do we get all this data?
• GRDDL
• RDFa
GRDDL
GRDDL<html xmlns="http://www.w3.org/1999/"> <head profile="http://www.w3.org/2003/g/data-view"> <title>Some Document</title> <link rel="transformation" href="http://www.w3.org/2000/06/dc-extract/dc-extract.xsl" /> <meta name="DC.Subject" content="Some subject"/> ... </head> ... <span class=”date”>2006-01-02</span> ...</html>
GRDDL<html xmlns="http://www.w3.org/1999/"> <head profile="http://www.w3.org/2003/g/data-view"> <title>Some Document</title> <link rel="transformation" href="http://www.w3.org/2000/06/dc-extract/dc-extract.xsl" /> <meta name="DC.Subject" content="Some subject"/> ... </head> ... <span class=”date”>2006-01-02</span> ...</html>
<rdf:Description rdf:about="..."> <dc:subject>Some subject</dc:subject> <dc:date>2006-01-02</dc:date></rdf:Description>
RDFa
RDFa<div about=”http://uri.to.newsitem”> <span property="dc:date">March 23, 2004</span> <span property="dc:title">High-tech rollers hit casino for £1.3m</span> By <span property="dc:creator">Steve Bird</span> …</div>
RDFa<div about=”http://uri.to.newsitem”> <span property="dc:date">March 23, 2004</span> <span property="dc:title">High-tech rollers hit casino for £1.3m</span> By <span property="dc:creator">Steve Bird</span> …</div>
<rdf:Description rdf:about="http://uri.to.newsitem"> <dc:date>March 23, 2004</dc:date> <dc:title>High-tech rollers hit casino for £1.3m</dc:title> <dc:creator>Steve Bird</dc:creator></rdf:Description>
Conclusion
• Semantic Web
• Semantic Web Services
• RDF, RDFS and OWL
• data extraction (GRDDL / RDFa)
Acknowledgements
Acknowledgements
• Aaron Swartz
Acknowledgements
• Aaron Swartz
• A.M. Kuchling
Acknowledgements
• Aaron Swartz
• A.M. Kuchling
• Tim Berners-Lee
Acknowledgements
• Aaron Swartz
• A.M. Kuchling
• Tim Berners-Lee
• Ivan Herman
Acknowledgements
• Aaron Swartz
• A.M. Kuchling
• Tim Berners-Lee
• Ivan Herman
• ...