Semantic Web Modeling Languages Part I: RDF

Similar documents
RDF Schema Sebastian Rudolph

SEMANTIC WEB 03 RDF DATA MODEL RESOURCE DESCRIPTION FRAMEWORK IMRAN IHSAN ASSISTANT PROFESSOR, AIR UNIVERSITY, ISLAMABAD

CS Knowledge Representation and Reasoning (for the Semantic Web)

RDF Schema Sebastian Rudolph

Knowledge Representation for the Semantic Web

RDF AND SPARQL. Part I: Basics of RDF. Dresden, August Sebastian Rudolph ICCL Summer School

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES

RDF AND SPARQL. Part III: Semantics of RDF(S) Dresden, August Sebastian Rudolph ICCL Summer School

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES

Knowledge Representation for the Semantic Web

Today: RDF syntax. + conjunctive queries for OWL. KR4SW Winter 2010 Pascal Hitzler 3

Semantic Web In Depth: Resource Description Framework. Dr Nicholas Gibbins 32/4037

CS Knowledge Representation and Reasoning (for the Semantic Web)

XML and Semantic Web Technologies. III. Semantic Web / 1. Ressource Description Framework (RDF)

Knowledge Management with the WWW

Logic and Reasoning in the Semantic Web (part I RDF/RDFS)

KNOWLEDGE GRAPHS. Lecture 3: Modelling in RDF/Introduction to SPARQL. TU Dresden, 30th Oct Markus Krötzsch Knowledge-Based Systems

Semantic Web Technologies: RDF + RDFS

Semantic Web. RDF and RDF Schema. Morteza Amini. Sharif University of Technology Spring 90-91

Seman&cs)of)RDF) )S) RDF)seman&cs)1)Goals)

The Resource Description Framework and its Schema

a paradigm for the Semantic Web RDF Data Model Angelica Lo Duca IIT-CNR Linked Open Data:

RDF Semantics A graph-based approach

RDF Schema. Philippe Genoud, UFR IM2AG, UGA Manuel Atencia Arcas, UFR SHS, UGA

Semantic Web. MPRI : Web Data Management. Antoine Amarilli Friday, January 11th 1/29

Contents. G52IWS: The Semantic Web. The Semantic Web. Semantic web elements. Semantic Web technologies. Semantic Web Services

Outline RDF. RDF Schema (RDFS) RDF Storing. Semantic Web and Metadata What is RDF and what is not? Why use RDF? RDF Elements

Linking Data with RDF

KNOWLEDGE GRAPHS. Lecture 2: Encoding Graphs with RDF. TU Dresden, 23th Oct Markus Krötzsch Knowledge-Based Systems

Web Science & Technologies University of Koblenz Landau, Germany. RDF Schema. Steffen Staab. Semantic Web

Unit 2 RDF Formal Semantics in Detail

Ontological Modeling: Part 2

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES

Multi-agent and Semantic Web Systems: RDF Data Structures

LECTURE 09 RDF: SCHEMA - AN INTRODUCTION

RDF Schema. Mario Arrigoni Neri

Semantics. KR4SW Winter 2011 Pascal Hitzler 1

RDF. Mario Arrigoni Neri

RDF AND SPARQL. Part IV: Syntax of SPARQL. Dresden, August Sebastian Rudolph ICCL Summer School

Semantic Web Technologies

Web Science & Technologies University of Koblenz Landau, Germany RDF. Steffen Staab. Semantic Web

Transforming Data from into DataPile RDF Structure into RDF

RDF. Charlie Abela Department of Artificial Intelligence

Mustafa Jarrar: Lecture Notes on RDF Schema Birzeit University, Version 3. RDFS RDF Schema. Mustafa Jarrar. Birzeit University

KNOWLEDGE GRAPHS. Lecture 4: Introduction to SPARQL. TU Dresden, 6th Nov Markus Krötzsch Knowledge-Based Systems

SPARQL: An RDF Query Language

RDF Semantics by Patrick Hayes W3C Recommendation

Semantic Web Knowledge Representation in the Web Context. CS 431 March 24, 2008 Carl Lagoze Cornell University

a paradigm for the Introduction to Semantic Web Semantic Web Angelica Lo Duca IIT-CNR Linked Open Data:

Part II. Representation of Meta-Information

Semantic Web Test

RDF /RDF-S Providing Framework Support to OWL Ontologies

Building Blocks of Linked Data

Semantic Web Engineering

RDF(S) Resource Description Framework (Schema)

An RDF-based Distributed Expert System

Web 2.0 Lecture 8: Resource Description Framework

RDFS. Suresh Manandhar* & Dimitar Kazakov

Formalising the Semantic Web. (These slides have been written by Axel Polleres, WU Vienna)

Resource Description Framework (RDF)

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES

SWAD-Europe Deliverable 8.1 Core RDF Vocabularies for Thesauri

11 The Semantic Web. Knowledge-Based Systems and Deductive Databases Knowledge Representation Knowledge Representation

SEMANTIC WEB 05 RDF SCHEMA MODELLING SEMANTICS IMRAN IHSAN ASSISTANT PROFESSOR, AIR UNIVERSITY, ISLAMABAD

Chapter 3. RDF Schema

Knowledge Representation for the Semantic Web

Opus: University of Bath Online Publication Store

Semantic Web Fundamentals

Analysis Data Transfer Framework "ORIENT" Specification

Applications and Technologies on top of XML. Semantic Web - RDF. Extensible Markup Language (XML) Revisited. Outline

OWL DL / Full Compatability

Logical reconstruction of RDF and ontology languages

Using RDF to Model the Structure and Process of Systems

The Logic of the Semantic Web. Enrico Franconi Free University of Bozen-Bolzano, Italy

RDF and RDF Schema. Resource Description Framework

RESOURCES DESCRIPTION FRAMEWORK: RDF

FIPA RDF Content Language Specification

A Technique for Automatic Construction of Ontology from Existing Database to Facilitate Semantic Web

Introduction to Semantic Web Databases. Version 1 Prepared By: Amgad Madkour Ph.D. Candidate Purdue University April 2018

Ontological Modeling: Part 11

Semantic Web Technologies: Web Ontology Language

Semistructured Data Management Part 3 (Towards the) Semantic Web

H1 Spring B. Programmers need to learn the SOAP schema so as to offer and use Web services.

From the Web to the Semantic Web: RDF and RDF Schema

2. RDF Semantic Web Basics Semantic Web

Design and Implementation of an RDF Triple Store

A Relaxed Approach to RDF Querying

OSM Lecture (14:45-16:15) Takahira Yamaguchi. OSM Exercise (16:30-18:00) Susumu Tamagawa

Semantic Information Retrieval: An Ontology and RDFbased

Reasoning with Rules SWRL as Example. Jan Pettersen Nytun, UIA

2. Knowledge Representation Applied Artificial Intelligence

Day 2. RISIS Linked Data Course

KDI RDF. Fausto Giunchiglia and Mattia Fumagallli. University of Trento

Bridging the Gap between Semantic Web and Networked Sensors: A Position Paper

INF3580/4580 Semantic Technologies Spring 2017

An Introduction to the Semantic Web. Jeff Heflin Lehigh University

Deep integration of Python with Semantic Web technologies

Integrating RDF into Hypergraph-Graph (HG(2)) Data Structure

Contents. RDF Resource Description Framework. A Graph Model for KR

Semantic Web and Python Concepts to Application development

Transcription:

Semantic Web Modeling Languages Part I: RDF Markus Krötzsch & Sebastian Rudolph ESSLLI 2009 Bordeaux slides available at http://semantic-web-book.org/page/esslli09_lecture

Outline A Brief Motivation RDF Simple Semantics for RDF RDF Schema Semantics for RDF(S) 2

Why Semantic Web Modelling? Initially, the Web was made for humans reading webpages. But there s too much information out there to be entirely checked by a human with a specific information need. Machines can process large amounts of data. Normal Web data (such as HTML) is not suitable for content-sensitive machine processing (ambiguous, relies on background knowledge, etc.) Semantic Web is concerned with representing information distributed across the Web in a machine-interpretable way. So, why not use XML? 3

Shortcomings of (Pure) XML Task: express The Book Foundations of Semantic Web Technologies is published by CRC Press. Many options: <published> <publisher>crc Press</publisher> <book>foundations of Semantic Web Technologies</book> </published> <publisher name="crc Press"> <published book= Foundations of Semantic Web Technologies/> </publisher> <book name="foudations of Semantic Web Technologies"> <published publisher="crc Press /> </book> ambiguity and tree structure inappropriate for intended purpose 4

Web-Wide Linked Open Data The Vision Becoming True 5

RDF: Graphs instead of Trees Solution: representation by directed graphs 6

RDF Resource Description Framework W3C Recommendation (http://www.w3.org/rdf) RDF is a data model (not one specific syntax) originally designed for providing metadata for Web resources, later used for more general purposes encodes structured information universal machine-readable exchange format 7

Building blocks for RDF Graphs URIs literals blank nodes (aka: empty nodes, bnodes) 8

URIs - Idea URI = Uniform Resource Identifier allow for denoting resources in a world-wide unambiguous way resources can be any object that possesses a clear identity (within the context of a given application) Examples: books, cities, humans, publishers, but also relations between those, abstract concepts, etc. already realized in some domains: e.g., ISBN for books 9

URIs - Syntax Builds on concept of URLs but not every URI refers to a Web document (but often the URL of a document is used as its URI) URI starts with so-called URI schema separated from the following part by ": (e.g, http, ftp, mailto) mostly hierarchically organized 10

Self-defined URIs necessary if no URI exists (yet) for a resource (or it is not known) strategy for avoiding unwanted clashes: use http URIs of webspace you control this also allows you to provide some documentation about the URI How to distinguish URI of a resource from URI of the associated documents describing it? Example: URI for "Othello don t use: http://de.wikipedia.org/wiki/othello rather use: http://de.wikipedia.org/wiki/othello#uri" 11

Literals used for representing data values written down as strings interpreted via assigned datatype literals without explicitly associated datatype are treated like strings 12

Bnodes used to state existence of an entity the reference of which is not known from a logic perspective: existentially quantified variables 13

Graphs as Triple Sets there are several ways for representing graphs in RDF we see graphs as set of vertexedge-vertex triples 14

Graphs as Triple Sets there are several ways for representing graphs in RDF we see graphs as set of vertexedge-vertex triples 15

Graphs as Triple Sets there are several ways for representing graphs in RDF we see graphs as set of vertexedge-vertex triples 16

RDF Triples constitutents of an RDF triple subject predicate object terms inspired by linguistics but doesn t always coincide eligible instantiations: subject : URI or bnode predicate : URI objekt : URI or bnode or literal 17

Turtle - An Easy Syntax for RDF Turtle notation: unabbreviated URIs in < > literals in period at the end of each triple extra spaces and linebreaks outside of names irrelevant <http://semantic-web-book.org/uri> <http://example.org/publishedby> <http://crcpress.com/uri>. <http://semantic-web-book.org/uri> <http://example.org/title> "Foundations of Semantic Web Technologies". <http://crcpress.com/uri> <http://example.org/name> "CRC Press". 18

Turtle - An Easy Syntax for RDF Turtle notation: unabbreviated URIs in < > but can be abbreviated by namespaces literals in period at the end of each triple extra spaces and linebreaks outside of names irrelevant @prefix book: <http://semantic-web-book.org/>. @prefix ex: <http://example.org/>. @prefix crc: <http://crcpress.com/>. book:uri ex:publishedby crc:uri. book:uri ex:title "Foundations of Semantic Web Technologies". crc:uri ex:name "CRC Press". 19

Turtle - An Easy Syntax for RDF Turtle notation: unabbreviated URIs in < > but can be abbreviated by namespaces literals in period at the end of each triple extra spaces and linebreaks outside of names irrelevant @prefix book: <http://semantic-web-book.org/>. @prefix ex: <http://example.org/>. @prefix crc: <http://crcpress.com/>. book:uri ex:publishedby crc:uri ; book:uri ex:title "Foundations of Semantic Web Technologies". crc:uri ex:name "CRC Press". repeated subjects may be le0 out 20

Turtle - An Easy Syntax for RDF Turtle notation: unabbreviated URIs in < > but can be abbreviated by namespaces literals in period at the end of each triple extra spaces and linebreaks outside of names irrelevant @prefix book: <http://semantic-web-book.org/>. @prefix ex: <http://example.org/>. @prefix crc: <http://crcpress.com/>. book:uri ex:publishedby crc:uri ; book:uri ex:title "Foundations of Semantic Web Technologies ; ex:author book:hitzler, book:krötzsch, book:rudolph. crc:uri ex:name "CRC Press". repeated subjects may be le0 out several objects can be assigned to the same subject predicate pairs 21

XML-Syntax of RDF there is also an XML syntax for RDF it s for machines, so we don t deal with it here <rdf:description rdf:about="http://semantic-web-book.org/uri"> <ex:title>foundations of Semantic Web Technologies</ex:title> <ex:publishedby> <rdf:description rdf:about="http://crcpress.com/uri"> <ex:name>crc Press</ex:name> </rdf:description> </ex:publishedby> </rdf:description> 22

Datatypes in RDF by now: literals were untyped, interpreted as strings (making e.g. "02, 2, 2.0 all different) typing literals with datatypes allows for more adequate (semantic = meaning-appropriate) treatment of values datatypes denoted by URIs and can be freely chosen frequently: xsd datatypes from XML syntax of typed literal: "datavalue"^^datatype-uri rdf:xmlliteral is the only datatype that is part of the RDF standard denotes arbitrary balanced XML snippets 23

Datatypes the Abstract View Example: xsd:decimal lexical space datatype mapping "3.14" "3.14000" "+03.14" value space 3,14-2,5 "-2.5" "100.00" 100 "3.14"="+03.14" holds for xsd:decimal but not for xsd:string 24

Datatypes in RDF Example Graph: Turtle: @prefix xsd: <http://www.w3.org/2001/xmlschema#>." <http://www.w3.org/tr/rdf-primer>" <http://example.org/title> "RDF Primer"^^xsd:string ;" <http://example.org/publicationdate> "2004-02-10"^^xsd:date. 25

Language Settings and Datatypes language settings only applicable to untyped literals <http://www.w3.org/tr/rdf-primer> " <http://example.org/title>" "Initiation à RDF"@fr, "RDF Primer"@en. distinct types or language settings distinct literals <http://crcpress.com/uri> <http://example.org/name> " "CRC Press"," "CRC Press"@en," "CRC Press"^^xsd:string. 26

n-ary Relationships Cooking with RDF: For the preparation of Chutney, we need the following: 1 lb green mango, 1 tsp. Cayenne pepper,... dish ingredient amount chutney green mango 1 lb chutney cayenne pepper 1 tsp. solved by auxiliary nodes (may be blank) 27

n-ary Relationships Turtle version 1: @prefix ex: <http://example.org/>. ex:chutney ex:hasingredient _:id1. _:id1 ex:ingredient ex:greenmango; ex:amount "1lb". Turtle version 2: @prefix ex: <http://example.org/>. ex:chutney ex:hasingredient [ ex:ingredient ex:greenmango; ex:amount "1lb" ]. 28

Special Datastructures in RDF open lists (containers) closed lists (collections) reified triples 29

Open Lists (Container) Graph: by rdf:type we assign a list type to the root node rdf:seq ordered liste (sequence) rdf:bag unordered list rdf:alt set of alternatives or choices 30

Closed Lists (Collections) Graph: Abbreviation for Turtle: @prefix book: <http://semantic-web-book.org/>. book:uri <http://example.org/authors>" ( book:uri/hitzler book:uri/krötzsch book:uri/rudolph ). 31

Reification How to model propositions about propositions such as: The Detective supposes that the butler killed the gardener. ex:supposes

Reification Solution: auxiliary node for nested proposition ex:supposes rdf:subject rdf:predicate rdf:object 33

Simple Semantics RDF is focused on information exchange and interoperability answers of RDF tools to entailment queries should coincide therefore, formal semantics needed defined in a modeltheoretic way, i.e. we start by defining interpretations 34

Simple Semantics Interpretations in RDF: 35

Simple Semantics when is a triple valid in an interpretation? a graph is valid, if all its triples are this settles the case for grounded graphs graph with blank nodes is valid if they can be mapped to elements such that the condition on the right is satisfied 36

Simple Entailment this model theory defines simple entailment this is essentially graph matching with bnodes being wildcards (more precisely: graph homomorphism) Example: the graph simply entails the graph 37

Schema Knowledge with RDF(S) RDF allows for specification of factual data = propositions about single resources (individuals) and their relationships desirable: propositions about generic groups of individuals, such as the class of publishers, of organizations, or of persons in database terminology: schema knowledge RDF Schema (RDFS): part of the RDF W3C recommendation 38

Classes and Instances book:uri rdf:type ex:textbook. characterizes the specific book as an instance of the (self-defined) class of textbooks class-membership not exclusive: " book:uri rdf:type ex:enjoyable. URIs can be typed as class-identifiers:" ex:textbook rdf:type rdfs:class." 39

Subclasses we want to express that every textbook is a book, e.g., that every instance of the class ex:textbook is automatically an instance of the class ex:book realized by rdfs:subclassof property: ex:textbook rdfs:subclassof ex:book." rdfs:subclassof is defined to be transitive and reflexive rule of thumb: rdf:type means rdfs:subclassof means 40

Properties technical term for Relations, Correspondencies Property names usually occur in predicate position in factoid RDF triples characterize, how two resources are related mathematically: set of pairs: married_with = {(Adam,Eva),(Brad,Angelina),...} URI can be marked as property name by typing it accordingly: ex:publishedby rdf:type rdf:property. 41

Subproperties in analogy to subclass relationships representation in RDFS via rdfs:subpropertyof e.g.: ex:happilymarriedwith rdf:subpropertyof rdf:marriedwith. then, given ex:markus ex:happilymarriedwith ex:anja." we can deduce ex:markus ex:marriedwith ex:anja." 42

Property Restrictions properties may give hints what types the linked resources have, e.g. we know that ex:publishedby connects publications with publishers i.e., for all URIs a, b where we know a ex:publishedby b. we want to automatically follow: a rdf:type ex:publication." b rdf:type ex:publisher." this generic correspondency can be encoded in RDFS: ex:publishedby rdfs:domain ex:publication." ex:publishedby rdfs:range ex:publisher. 43

Property Restrictions with property restrictions, semantic interdependencies between properties and classes can be specified Caution: property restrictions are interpreted globally and conjunctively, e.g. ex:authorof rdfs:range ex:cookbook." ex:authorof rdfs:range ex:storybook. " means: everything which is authored by somebody is both a cookbook and a storybook thus: always use most generic classes for domain/range statements 44

Additional Information used to add human-readable information (comments or names) for compatibility reasons graph-based representation recommended; set of properties for that purpose: rdfs:label assigns an alternative name (encoded as literal) to an arbitrary ressource rdfs:comment assigns a more comprehensive comment (also literal) rdfs:seealso, rdfs:definedby refer to resources (URIs!) containing further information about the subject resource 45

RDFS Entailment RDFS interpretations take care of RDF(S)-specific vocabulary by imposing additional conditions on simple interpretations: all URIs and bnodes are of type rdf:resource triple predicates are of type rdf:property all well-typed and untyped literals are of type rdf:literal types of triple subjects/objects correspond to rdfs:domain/rdfs:range statements rdfs:subclassof and rdfs:subpropertyof are interpreted reflexive and transitive and inheriting well-formed XML-Literals are mapped into LV, ill-formed ones go somewhere else...and many more 46

RDFS Entailment Automation RDFS entailment can be decided via rule-like deduction calculus (NP-complete) 47

Semantics of RDFS via Translation into FOL other option for defining RDF(S) semantics: embedding into first order logic 2 Problems: FOL doesn t provide literals/datatypes can be tackled by built-in predicates straight forward translation s p o. p(s,o) does not work, as p might also occur in subject or object position solved by alternative translation with one ternary predicate: s p o. triple(s,p,o) 48

Semantics of RDFS via Translation into FOL RDF graph is translated into FOL theory by introducing statement triple(s,p,o) for every triple s p o. for every blank node, one distinct variable is used (whereas URIs and literals are treated as constants) the final translation is obtained by conjunctively combining all the obtained statements and then existentially quantifying over all variables 49

Semantics of RDFS via Translation into FOL RDFS semantics can then be implemented by axiomatising the deduction calculus: 50

Deployment of RDF today there is a variety of RDF tools software libraries for virtually every programming language freely available systems for handling large sets of RDF data (so-called RDF stores or triple stores) increasingly supported by commercial actors (e.g. Oracle) basis for several data formats: RSS 1.0, XMP (Adobe), SVG (vector graphics format) 51

RDF(S) as Ontology Language? RDFS language features allow for modeling certain semantic aspects of a domain of interest hence, RDFS can be seen as a lightweight ontology language 52

RDF(S) as Ontology Language? Shortcomings of RDF(S): weak semantics: ex:speakswith rdfs:domain ex:homo." ex:homo rdfs:subclassof ex:primates. does not entail ex:speakswith rdfs:domain ex:primates. expressivity: no negative information can be specified, no cardinality, no disjunction 53

References W3C Specification: http://www.w3.org/rdf/ Pascal Hitzler, Markus Krötzsch, Sebastian Rudolph, York Sure, Semantic Web Grundlagen. Springer, 2008. http://www.semantic-web-grundlagen.de/ (In German.) Pascal Hitzler, Markus Krötzsch, Sebastian Rudolph, Foundations of Semantic Web Technologies. Chapman & Hall/CRC, 2009. http://www.semantic-web-book.org/wiki/fost (Grab a flyer from us.)