Semantic Web Technologies Lecture Dr. Harald Sack Hasso-Plattner-Institut für IT Systems Engineering University of Potsdam Winter Semester 2012/13 Lecture Blog: http://semweb2013.blogspot.com / This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0 ) Dienstag, 23. Oktober 12
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
Semantic Web Technologies
LectureDr. Harald Sack
Hasso-Plattner-Institut für IT Systems EngineeringUniversity of Potsdam
Winter Semester 2012/13
Lecture Blog: http://semweb2013.blogspot.com/This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
2 1. Introduction 2. Semantic Web - Basic Architecture
Languages of the Semantic Web - Part 1
3. Knowledge Representation and LogicsLanguages of the Semantic Web - Part 2
4. Applications in the ,Web of Data‘
Semantic Web Technologies Content
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
3
2. Semantic Web - Basic ArchitectureLanguages of the Semantic Web - Part 1
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
4
Semantic Web Technologies Content
2. Semantic Web Basic ArchitectureThe Languages of the Semantic Web - Part 1
• Uniform Resource Identifier - URI• Recapitulation: XML and XMLSchema• Resource Description Framework - RDF
• RDF Schema• How Do We Get Semantics into WWW?
• µFormats, schema.org, RDFa and GRDDL• Query Language SPARQL• Why RDF(S) is not enough
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
5
What is this?
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
6
What`s the difference?
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
7
Semiotic Triangle
Symbol Objectstands for
Ogden, Richards, Semiotic Triangle, 1923
„apple“
symbolizes refers to
Concept
shared concept
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
8
Uniform
Resource
Identifier
□ different types of resource identifiers all constructed according to a uniform schema
□ whatever may be identified via URI
□ to distinguish one resource from another
The Designator in the Web
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
9
Uniform Resource Identifier ■ A Uniform Resource Identifier (URI) defines a simple and extensible schema
for worldwide unique identification of abstract or physical resources (RFC 3986).
■ Resource can be every object with a clear identity (according to the context of the application) □ as e.g., web pages, books, locations, persons, relations among
objects, abstract concepts, etc.■ The concept of URI is already established in various domains, as e.g., □ the Web (URL, PRN, pURL), □ Books and publications (ISBN, ISSN), □ Digital Object Identifier (DOI)
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
10
http://www.tour-eiffel.fr/index.htmlURI
Eiffel Tower
Resource
Metadata: Content-type: text/htmlData:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Le site officiel de la Tour Eiffel</title> ...</html>
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
11Metadata: Content-type: text/htmlData:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Le site officiel de la Tour Eiffel</title> ...</html>
Web Server sends HTTP ResponseHTTP/1.1 200 OKContent-Length: 3134Content-Type: text/html; charset=utf-8
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Le site officiel de la Tour Eiffel</title> ...</html>
Browser interprets representation and displays presentation
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
16
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Designator and Designatum
17
W3C: Architecture of the World Wide Web, Volume One
□A resource can be described (designated) via Metadata □ Even if the resource itself cannot be delivered from the
web server, probably its representation might be available that describes the resource sufficiently.
The distinguishing characteristic of [information] resources is that all of their essential characteristics can be conveyed in a message.
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
18
Metadata
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Metadaten
19
Metadata
• „Metadata are data that contain information about other data“ and „Metadata are required to fulfill a specific purpose or to achieve a specific result“(informal definition, Wikipedia)
• „Metadata are structures, encoded data that describe the characteristics of information bearing entities for the purpose of identification, retrieval, evaluation and administration of the described entities.“(W. R. Durrell: Data Administration: A practical Guide to Data Administration. McGraw – Hill, 1985)
• „Metadata is machine understandable information about web resources or other things“ (Tim Berners-Lee: Axioms of Web Architecture: Metadata, 1997)
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
20
URI, Ressource and Metadata
http://www.tour-eiffel.fr/index.htmlURI
Information about the Eiffel Tower
Resource:Eiffel Tower Metadata
Metadata: Content-type: text/htmlData:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Le site officiel de la Tour Eiffel</title> ...</html>
■ Extension to Universal Character Code (Unicode/ISO 10646)□ Internationalized Resource Identifier (IRI, RFC 3987)
e.g.:
URI - Generic Syntax
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
23
URI = schema"://"[userinfo"@"]host[:port][path]["?"query]["#"fragment]
■ schema: e.g. http, ftp, mailto,...■ userinfo: e.g. username:password■ host: e.g. Domain-Name, IPv4/IPv6 Address■ port: e.g. :80 for standard http port■ path: e.g. path in file system of WWW server■ query: e.g. parameters to be passed over to applications■ fragment: e.g. determines a specific fragment of a document
URI - Generic Syntax
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
24 Media Fragment Identifier■ Multimedia Data cover temporal and spatial dimension■ pinpoint acces to multimedia resources via URI Media Fragment Identifier
(W3C Media Fragments URI 1.0, 25. September 2012, W3C Recommendation)■ Example:
■ WWW Client and WWW Server have to take care for handling media fragments correctly, i.e. consequences for http protocol
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
26
Semantic Web Technologies Content
2. Semantic Web Basic ArchitectureThe Languages of the Semantic Web - Part 1
• Uniform Resource Identifier - URI• Recapitulation: XML and XMLSchema• Resource Description Framework - RDF
• RDF Schema• How Do We Get Semantics into WWW?
• µFormats, schema.org, RDFa and GRDDL• Query Language SPARQL• Why RDF(S) is not enough
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
27
2. Semantic Web Basic ArchitectureThe Languages of the Semantic Web - Part 1
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
28
Semantic Web Technologies Content
2. Semantic Web Basic ArchitectureThe Languages of the Semantic Web - Part 1
• Uniform Resource Identifier - URI• Recapitulation: XML and XMLSchema• Resource Description Framework - RDF
• RDF Schema• How Do We Get Semantics into WWW?
• µFormats, schema.org, RDFa and GRDDL• Query Language SPARQL• Why RDF(S) is not enough
Dienstag, 23. Oktober 12
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)
Dienstag, 23. Oktober 12
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-527“
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
■Schemata have to be translated■Problems:□Reengineering is expensive and complicated□Reengineering would not be necessary with a conceptual knowledge
representation languagh□Schema translations (XSLT) are expensive and not necessary
use abstract level above XML
Resource Description Framework (RDF)• simple and extensible
Knowledge Representation and Communication
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Level 1(Objekte)
XMLXMLSchema
Level 3(abgeschlossene
Welten)
OWL
RDFRDFSchema
Level 2(Wissen über
Objekte)
Knowledge Representation and Communication
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
38
RDF
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
39
Resource■ can be everything (in principle)...■must be uniquely identified and be referencable■ ...simply via URI
Resource Description Framework
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
40
Resource Description Framework
Description■ = Descriptions of resources■ ...via representing their relationships among each other■ ...relationships can be represented as graphs
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
41
Resource Description Framework
Framework■ = Combination of web based protocols (URI, HTTP, XML,...)■ based on formal model (semantics)■ defines all allowed relationships among resources
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
42
Resource Description Framework
■Originally developed to define metadata for web resources ■ 1995-1997: proprietary Meta Content Framework (Netscape)■ 1997 RDF as general description language for metadata, W3C Draft■ 1998 first RDF W3C recommendation (http://www.w3c.org/RDF)
■Definition of an XML subset (machine readable) with predefined (fixed) semantics (machine understandable)
■ Simple, universal semantic data model■ RDF enables high interoperability
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
43
Resource Description Framework
Harald Sack
has phone number
++49 (331) 5509-527
Subject
Property
Object
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
44
Resource Description Framework
Harald Sack
has phone number
++49 (331) 5509-527
■ Knowledge in RDF is expressed as a list of statements■ all RDF statements follow the same simple schema
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
45
Resource Description Framework
Harald Sack
has phone number
++49 (331) 5509-527
Subject
Property
Object
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
46
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
Dienstag, 23. Oktober 12
Constituents of the RDF-Graphen• URI:
• to reference resources uniquely
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
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
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
89
Resource Description Framework
RDF-Reification• Is Reification really necessary?• Modeling data provenance • Formalizing statements about Reliability (Trust) • Definition of Metadata about Statements (Assertions, Statements)
• for (general) knowledge representation (Ontologie Construction):• Transformation of Relations into Classes
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
90
RDF and Data Integration
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
91
• Simple Example: Bibliography Database
ID Author Title Publisher Year
ISBN 0-00-651409-X HS-123 WWW S-001 2004
ID Name Homepage
HS-123 Harald Sack http://hpi-web.de/HaraldSack.html
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
96
RDF - a Resume
RDF Model -- Summary• An RDF Model is a set of RDF statements• Statement := (subject, property, object)• Subject is a resource• Property is a resource• Object is ether a resource or a literal
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
97
Semantic Web Technologies Content
2. Semantic Web Basic ArchitectureThe Languages of the Semantic Web - Part 1
• Uniform Resource Identifier - URI• Recapitulation: XML and XMLSchema• Resource Description Framework - RDF
• RDF Schema• How Do We Get Semantics into WWW?
• µFormats, schema.org, RDFa and GRDDL• Query Language SPARQL• Why RDF(S) is not enough
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
98
SO ... WE NEED A WAY TO DEFINE RDF SCHEMATA FORCLASSES AND RELATIONS ?!
Next lecture
RDFS
Dienstag, 23. Oktober 12
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam