OpenHPI 2.2 - How to Represent Facts - RDF
-
Upload
harald-sack -
Category
Documents
-
view
714 -
download
3
description
Transcript of OpenHPI 2.2 - How to Represent Facts - RDF
This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
Dr. Harald Sack
Hasso Plattner Institute for IT Systems Engineering
University of Potsdam
Spring 2013
Semantic Web Technologies
Lecture 2: Semantic Web - Basic Architecture I02: How to Represent Facts? - RDF(1)
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
2
Lecture 2: Semantic Web - Basic Architecture I
Open HPI - Course: Semantic Web Technologies
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
3
02 How to Represent Facts? - RDF (1)Open HPI - Course: Semantic Web Technologies - Lecture 2: Semantic Web Basic Architecture I
Introduction
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Tim Berners-Lee: W3 future directions, Plenary at 1st WWW Conference, 1994, Geneva (Switzerland)
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
To a computer, then, the web is a flat, boring world devoid of meaning. This is a pity, as in fact documents on the web describe real objects and imaginary concepts, and give particular relationships between them. For example, a document might describe a person. The title document to a house describes a house and also the ownership relation with a person. [...]
Tim Berners-Lee: W3 future directions, Plenary at 1st WWW Conference, 1994, Geneva (Switzerland)
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
5
2. Semantic Web Basic ArchitectureThe Languages of the Semantic Web - Part 1
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
■How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
Knowledge Representation... a simple example
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
■How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
<phonenr> <owner>Harald Sack</owner> <number>++49 (331) 5509-927</number></phonenr>
Knowledge Representation... a simple example
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
■How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
<phonenr> <owner>Harald Sack</owner> <number>++49 (331) 5509-927</number></phonenr>
<person name=“Harald Sack“> <phonenr>49 (331) 5509-927</phonenr></person>
Knowledge Representation... a simple example
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
■How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
<phonenr> <owner>Harald Sack</owner> <number>++49 (331) 5509-927</number></phonenr>
<person name=“Harald Sack“> <phonenr>49 (331) 5509-927</phonenr></person>
<person name=“Harald Sack“ phone=“49 (331) 5509-927“ />
Knowledge Representation... a simple example
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
■How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
<phonenr> <owner>Harald Sack</owner> <number>++49 (331) 5509-927</number></phonenr>
<person name=“Harald Sack“> <phonenr>49 (331) 5509-927</phonenr></person>
<person name=“Harald Sack“ phone=“49 (331) 5509-927“ />
is there a unique (intuitive) way to model knowledge?
Knowledge Representation... a simple example
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Harald Sack
Knowledge Representation... a simple example
■How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Harald Sack
has the phone number
Knowledge Representation... a simple example
■How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Harald Sack
has the phone number
++49 (331) 5509-927
Knowledge Representation... a simple example
■How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation... a simple example
■How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
■ Intuitive knowledge representation with directed graphs
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Harald Sackhas phone number
++49 (331) 5509-927
Knowledge Representation... a simple example
■How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
■ Intuitive knowledge representation with directed graphs
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Level 1(objects)
XMLXMLSchema
Knowledge Representation in the Semantic Web
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Level 1(objects)
XMLXMLSchema
RDF &RDFSchema
Level 2(knowledge about
objects)
Knowledge Representation in the Semantic Web
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Level 1(objects)
XMLXMLSchema
Level 3(entire worlds)
OWL & Rules
RDF &RDFSchema
Level 2(knowledge about
objects)
Knowledge Representation in the Semantic Web
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
10
RDF
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
11
Resource■ can be everything (in principle)...
■must be uniquely identified and be referencable
■ ...simply via URI
Resource Description Framework
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
12
Resource Description Framework
Description■ = Descriptions of resources
■ ...via representing properties and relationships among resources
■ ...relationships can be represented as graphs
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
13
Resource Description Framework
Framework■ = Combination of web based protocols (URI, HTTP, XML,...)
■ based on formal model (semantics)
■ defines all allowed relationships among resources
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
14
Resource Description Framework
Harald Sack
has phone number
++49 (331) 5509-927
Subject
Property
Object
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
15
Resource Description Framework
Harald Sack
has phone number
++49 (331) 5509-927
■ Knowledge in RDF is expressed as a list of statements
■ all RDF statements follow the same simple schema
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
16
Resource Description Framework
Harald Sack
has phone number
++49 (331) 5509-927
Subject
Property
Object
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
17
Resource Description Framework
• Resources:Objects that can be addressed via URI
• Properties:Attributes for the description of resources
• Statements (RDF-Triple):Resource + Property + Object / Value
URI URI URI / Literal
Constituents of the RDF-Graph• URI:
• to reference resources uniquely
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
18
Resource Description Framework
http://hpi-web.de/HaraldSack http://semweb2013.blogspot.com/
http://hpi-web.de/Personal#writesBlog
S
P
O
Constituents of the RDF-Graphen• Literals:
• describe data values that do not have a separate existence
• strings, interpretation via datatype
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
19
Resource Description Framework
http://hpi-web.de/HaraldSack ++49-331-5509-927
http://hpi-web.de/Personal#hasPhoneNumber
S
P
O
Constituents of the RDF-Graphen• Literals:
• typed literals can be expressed via XML Schema datatypes
• Namespace for typed literals: http://www.w3.org/2001/XMLSchema#
• Example: “Semantics“^^<http://www.w3.org/2001/XMLSchema#string>
• Language Tags denote the (natural) language of the text:
• Example: “Semantik“@de , “Semantics“@en
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
20
Resource Description Framework
Constituents of the RDF-Graphen• Blank Nodes:
• Denotes existence of an individual with specific attributes, but without providing an identification or reference
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
21
Resource Description Framework
S
http://www.hpi-web.de/personal#person
rdf:typeP
O
RDF Representations• Node-Edge-Node Triple
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
22
Resource Description Framework
http://hpi-web.de/HaraldSack
http://hpi-web.de/Personal#writesBlog
S
P
O
http://semweb2013.blogspot.com/
RDF Representations• N3 Notation
•Simple listing of triples
• { http://hpi-web.de/HaraldSack, http://hpi-web.de/Personal#writesBlog, http://semweb2013.blogspot.com/ }
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
23
Resource Description Framework
RDF Representations• Turtle (Terse RDF Tripel Language)• Extension of N3
• URIs in angle brackets• Literals in quotation marks
• Triple ends with a period
• Whitespaces will be ignored
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
24
Resource Description Framework
<Subject> <Property> <Object> .<Subject> <Property> “Object“ .
RDF Representations• Turtle (Terse RDF Tripel Language)
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
25
Resource Description Framework
<http://hpi-web.de/HaraldSack> <http://hpi-web.de/Personal#writesBlog> <http://semweb2013.blogspot.com/>.
<http://hpi-web.de/HaraldSack> <http://hpi-web.de/Personal#hasPhoneNumber> “++49-331-5509-927“.
RDF Representations• Turtle (Terse RDF Tripel Language)
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
26
Resource Description Framework
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .@prefix dc: <http://purl.org/dc/elements/1.1/> .@prefix ex: <http://example.org/stuff/1.0/> .
<http://www.w3.org/TR/rdf-syntax-grammar> dc:title "RDF/XML Syntax Specification (Revised)"@en ; ex:editor [ ex:fullname "Dave Beckett"^^xsd:string ; ex:homePage <http://purl.org/net/dajobe/> ] .
RDF Representations• RDF XML-Serialization
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
27
Resource Description Framework
<xml version=“1.0“ encoding=“utf-8“><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“ xmlns:pers=“http://hpi-web.de/Personal#“>
<rdf:Description rdf:about=“http://hpi-web.de/HaraldSack“> <pers:hasPhoneNr>++49-331-5509-927</pers:hasPhoneNumber> </rdf:Description>
<rdf:Description rdf:about=“http://hpi-web.de/HaraldSack“> <pers:writesBlog> <rdf:Description rdf:about=“http://semweb2013.blogspot.com/“></rdf:Description> </pers:writesBlog> </rdf:Description></rdf:RDF>
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
28
03 How to Represent Facts? - RDF (2)Open HPI - Course: Semantic Web Technologies - Lecture 2: Semantic Web Basic Architecture I
Simple Facts in RDF