Chapter 2 RDF Syntax 1.

Slides:



Advertisements
Similar presentations
UKOLN, University of Bath
Advertisements

CH-4 Ontologies, Querying and Data Integration. Introduction to RDF(S) RDF stands for Resource Description Framework. RDF is a standard for describing.
RDF Schemata (with apologies to the W3C, the plural is not ‘schemas’) CSCI 7818 – Web Technologies 14 November 2001 Van Lepthien.
The Semantic Web – WEEK 4: RDF
Introduction to RDF Based on tutorial at
Knowledge Technologies Manolis Koubarakis
1 RDF Tutorial. C. Abela RDF Tutorial2 What is RDF? RDF stands for Resource Description Framework It is used for describing resources on the web Makes.
Developing a Metadata Exchange Format for Mathematical Literature David Ruddy Project Euclid Cornell University Library DML 2010 Paris 7 July 2010.
CS570 Artificial Intelligence Semantic Web & Ontology 2
ESDSWG2011 – Semantic Web session Semantic Web Sub-group Session ESDSWG 2011 Meeting – Semantic Web sub-group session Wednesday, November 2, 2011 Norfolk,
RDF Tutorial.
Semantic Web Introduction
Quratulain Rajput Faculty of Computer Science, IBA Spring2013
RDF formats for Linked Data by Mabi Harandi. RDF is not a format, it is a model for data So: It will provide supports for different formats like :  Turtle.
Chapter 3 RDF Syntax 1. Topics Basic concepts of RDF resources, properties, values, statements, triples URIs and URIrefs RDF graphs Literals and Qnames.
Dr. Alexandra I. Cristea RDF.
COMP 6703 eScience Project Semantic Web for Museums Student : Lei Junran Client/Technical Supervisor : Tom Worthington Academic Supervisor : Peter Strazdins.
RDF: Data Description With HTML, the Web is for reading With XML, the Web is for processing Necessary to know  who wrote this?  who owns it?  who authorised.
RDF: Building Block for the Semantic Web Jim Ellenberger UCCS CS5260 Spring 2011.
The RDF meta model: a closer look Basic ideas of the RDF Resource instance descriptions in the RDF format Application-specific RDF schemas Limitations.
Guide To UNIX Using Linux Third Edition
Module 2b: Modeling Information Objects and Relationships IMT530: Organization of Information Resources Winter, 2007 Michael Crandall.
Nancy Ide Vassar College USA Resource Definition Framework A Tutorial EUROLAN 2003 July 28 - August 8 Bucharest - Romania.
UKOLUG - July Metadata for the Web RDF and the Dublin Core Andy Powell UKOLN, University of Bath UKOLN.
RDF: Concepts and Abstract Syntax W3C Recommendation 10 February Michael Felderer Digital Enterprise.
RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting.
Logics for Data and Knowledge Representation
Of 33 lecture 3: xml and xml schema. of 33 XML, RDF, RDF Schema overview XML – simple introduction and XML Schema RDF – basics, language RDF Schema –
CC L A W EB DE D ATOS P RIMAVERA 2015 Lecture 2: RDF Model & Syntax Aidan Hogan
Of 41 lecture 4: rdf – basics and language. of 41 RDF basic ideas the fundamental concepts of RDF  resources  properties  statements ece 720, winter.
RDF and XML 인공지능 연구실 한기덕. 2 개요  1. Basic of RDF  2. Example of RDF  3. How XML Namespaces Work  4. The Abbreviated RDF Syntax  5. RDF Resource Collections.
Practical RDF Chapter 2. RDF: Heart and Soul Shelley Powers, O’Reilly SNU IDB Lab. Taikyoung Kim.
Semantic web course – Computer Engineering Department – Sharif Univ. of Technology – Fall Knowledge Representation Semantic Web - Fall 2005 Computer.
Part I. Resource and AAA In the Semantic Web, anything is a ‘resource’ if anything can be said about it by anyone for any purpose The AAA slogan applies.
Semantic Web Exam 1 Review.
EEL 5937 Ontologies EEL 5937 Multi Agent Systems Lecture 5, Jan 23 th, 2003 Lotzi Bölöni.
Of 35 lecture 5: rdf schema. of 35 RDF and RDF Schema basic ideas ece 627, winter ‘132 RDF is about graphs – it creates a graph structure to represent.
Introduction The Resource Description Framework (RDF) is recommended by the World Wide Web Consortium (W3C) to model meta-data about the resources of the.
The future of the Web: Semantic Web 9/30/2004 Xiangming Mu.
Introduction to the Semantic Web and Linked Data Module 1 - Unit 2 The Semantic Web and Linked Data Concepts 1-1 Library of Congress BIBFRAME Pilot Training.
Understanding RDF. 2/30 What is RDF? Resource Description Framework is an XML-based language to describe resources. A common understanding of a resource.
The RDF meta model Basic ideas of the RDF Resource instance descriptions in the RDF format Application-specific RDF schemas Limitations of XML compared.
Practical RDF Ch.2 Junwon Jung SNU OOPSLA Lab. Shelley Powers, O’Reilly August 5, 2004.
Practical RDF Ch.4 Specialized RDF Relationships: Reification, Containers, and Collections Kim, Jong-Nam SNU OOPSLA Lab. August 12, 2004.
Doc.: IEEE /0169r0 Submission Joe Kwak (InterDigital) Slide 1 November 2010 Slide 1 Overview of Resource Description Framework (RFD/XML) Date:
Of 38 lecture 6: rdf – axiomatic semantics and query.
EEL 5937 Ontologies EEL 5937 Multi Agent Systems Lotzi Bölöni.
Chapter 3 RDF. Introduction Problem: What does an XML document mean? – XML is about data structures – Their meaning (semantics) is not apparent to a machine.
Chapter 3 RDF Syntax. RDF Overview RDF Syntax -- the XML encoding RDF Syntax – variations including N3 RDF Schema (RDFS) Semantics of RDF and RDFS – Axiomatic.
Knowledge Technologies Manolis Koubarakis 1 Some Other Useful Features of RDF.
Chapter 5 The Semantic Web 1. The Semantic Web  Initiated by Tim Berners-Lee, the inventor of the World Wide Web.  A common framework that allows data.
Other RDF Capabilities. Exercise: Write the following information into a set of statements (triples) and then draw them into and RDF graph The article.
Linked Data & Semantic Web Technology The Semantic Web Part 5. Resource Description Framework (2) Dr. Myungjin Lee.
Semantic Web In Depth Resource Description Framework Dr Nicholas Gibbins –
Setting the stage: linked data concepts Moving-Away-From-MARC-a-thon.
Linked Data & Semantic Web Technology The Semantic Web Part 4. Resource Description Framework (1) Dr. Myungjin Lee.
4.01 How Web Pages Work.
Service-Oriented Computing: Semantics, Processes, Agents
Introduction to Persistent Identifiers
Resource Description Framework - RDF
Service-Oriented Computing: Semantics, Processes, Agents
Resource Description Framework
Resource Description Framework
Service-Oriented Computing: Semantics, Processes, Agents
Grid Computing 7700 Fall 2005 Lecture 18: Semantic Grid
CC La Web de Datos Primavera 2016 Lecture 2: RDF Model & Syntax
ece 720 intelligent web: ontology and beyond
Grid Computing 7700 Fall 2005 Lecture 18: Semantic Grid
Resource Description Framework (RDF)
4.01 How Web Pages Work.
Presentation transcript:

Chapter 2 RDF Syntax 1

RDF Overview RDF data model RDF syntax? RDF serializations: XML, Turtle, N3, ntriples RDF Schema (RDFS) Semantics of RDF and RDFS Axiomatic Semantics Operational semantics based on rules Querying RDF via SPARQL

Introduction Problem: What does an XML document mean? XML is about data structures The meaning (semantics) not apparent to machines RDF is more a data model than a language It is realized in many different formats RDF defines very basic semantics RDFS and OWL define more RDF vocabulary for building rich data models RDF remains domain independent

Example 1 What does this mean? <academicStaffMember> Grigoris Antoniou </academicStaffMember> <professor> Michael Maher </professor> <course name="Discrete Mathematics"> <isTaughtBy> David Billington </isTaughtBy> </course> What does this mean? Are professors also academic staff members? If someone teaches a course, are they an academic staff member? Can’t say in XML, but can say so in RDFS

Example 2 Embedding of elements is just a syntactic constraint <course name="Discrete Mathematics"> <lecturer>David Billington</lecturer> </course> <lecturer name="David Billington"> <teaches>Discrete Mathematics</teaches> </lecturer> <teachingOffering> <course>Discrete Mathematics</course> </teachingOffering> Embedding of elements is just a syntactic constraint No meaning is defined Meaning is in documentation or viewer’s minds Does the machine have a mind?

Key RDF documents: standards http://w3.org/standards/techs/rdf

Topics Basic concepts of RDF Vocabularies and modeling Resources, properties, values, statements, triples URIs and URIrefs RDF graphs Literals, qnames Vocabularies and modeling Vocabularies Blank nodes, data modeling, types, reification Lists, bags, collections Serialization of RDF graphs XML, Turtle, Ntriples Critique of RDF

What is RDF? A data model for representing information (esp. metadata) about resources in the Web Can represent information about things that can be identified on the Web, even when not retrievable (e.g., a book) Usecases: provide data for applications rather than directly to people

RDF Basics Core idea: identify resources using Web identifiers and describing resources in terms of simple properties and property values RDF data model is as a “pure” graph model To identify resources, RDF uses Uniform Resource Identifiers (URIs) and URI references (URIrefs). Definition: A resource is anything that is identifiable by a URIref

Example Consider the following information: “there is a Person identified by http://www.w3.org/People/EM/contact#me, whose name is Eric Miller, whose email address is em@w3.org, and whose title is Dr.”

Example (cont’d)

Basics Resources being described have properties that have values, and resources are described by making statements specifing those properties and values The part that identifies the thing the statement is about is the subject The part that identifies the property of the subject the statement specifies is the predicate The part that identifies the property’s value is the object

Example http://www.example.org/index.html has a creator whose value is “John Smith” The subject is the URL http://www.example.org/index.html The predicate is the word "creator" The object is the phrase “John Smith”

RDF Triples RDF statements can be written as triples Simple ntriples notation has a set of triples terminated by a periods, where URI’s are inside angle brackets <http://www.example.org/index.html> <http://purl.org/dc/elements/1.1/creator> <http://www.example.org/staffid/85740> . <http://www.example.org/index.html> <http://www.example.org/terms/creation-date> "August 16, 1999" . <http://www.example.org/index.html> <http://purl.org/dc/elements/1.1/language> "en" .

Graphs: pure and impure

Pure graph model A pure graph model consists only of edges between pairs of nodes Can be directed or undirected; can be labeled or not A graph can be represented as an unordered collection of (subject, predicate, object) triples If directed, predicate goes from subject to object Nodes not the subject or object of a triple are not even allowed (John, likes, Mary), (Mary, likes, Bill), ( John, hates, Bill) john bill mary likes hates

RDF graph model RDF is like this with a few caveats Subjects and predicates are identified by a URI Object can also be a URI but can also be a literals, i.e., a string or a number RDF defines some special URIs and gives them specific meaning http://www.w3.org/1999/02/22-rdf-syntax-ns#type RDF has simple conventions for representing both ordered and unordered sequences and a few other data structures john bill mary likes hates

Property graphs Graph databases have become popular in the past ten years A common extension of the pure graph model is to allow nodes and edges to have properties A simple version: properties are key/value pairs, e.g. Age : 25 Date : 1990-09-21” We might give the spouse edge from John to Mary two properties: start with value “1999-09-1” and end with value “2016-01-11”

URIs and URIREFs

Uniform Resource Identifiers (URIs) URIs identify resources on the Web Unlike URLs, they aren’t limited to identifying things with network locations No organization controls who makes URIs or how they can be used Some URI schemes (http: URL’s) depend on centralized systems such as DNS Others are completely decentralized

URI Reference (URIref) A URIref is a URI with an optional fragment identifier at the end, e.g: http://example.org/index.html#section2 Fragment usecase: HTML fragments refer to a place in a page RDF fragments refer to resources in a RDF graph that the URI denotes, e.g., subjects, predicates or objects http://www.w3.org/2004/02/skos/core : vocabulary for describing topics http://www.w3.org/2004/02/skos/core#broader : the broader concept in SKOS Core vocabulary Like URLs, URIrefs may be either absolute or relative Note: the empty URI refers to the resource it’s in

URIrefs in RDF (cont’d) RDF and Browsers use URIrefs to identify things, but interpret URIrefs slightly differently: Browsers also use URIrefs to retrieve things RDF uses URIrefs only to identify things and these might not even be retrievable Linked Data best practice is to use HTTP URIs that return RDF data for every URI

Content Negotiation What does HTTP stand for?

Content Negotiation What does HTTP stand for? HTTP == Hypertext Transfer Protocol Lets Web client (browser, program) and server (apache) do many things (e.g., authentication) E.g.: specify format of data returned, e.g., as RDF data in one of several formats or as HTML Consider http://dbpedia.org/page/Alan_Turing curl –LI http://dbpedia.org/page/Alan_Turing curl –LH "Accept:application/rdf+xml" http://dbpedia.org/page/Alan_Turing

RDF Graphs

RDF Graphs RDF models statements by nodes and arcs in a graph A statement is represented by a node for the subject, a node for the object and an arc for the predicate (subject => object) A node may be identified by a URIref or it can be a literal or a blank node An arc is identified by a URIref Note: We will draw RDF graphs as directed graphs But an arc can be the subject of an RDF statement :has_parent owl:inverseOf :has_child

Example Consider the following statements: http://www.example.org/index.html has a creation-date whose value is August 16, 1999. http://www.example.org/index.html has a language whose value is English.

The RDF Graph of the Example Note: http://purl.org/dc/elements/1.1 is prefix for the Dublin Core vocabulary/ontology http://www.example.org/… is uses for examples

RDF and Related Data Models In terms of the relational model, an RDF statement is like a tuple in a relation Graph with columns Subject, Predicate, Object For first-order logic, an RDF statement is like an atomic formula triple(subj, pred, obj) where triple is a FOL predicate and subj, pred and obj are constants Alternativedly in logic: pred(subj, obj)

Literals and QNames

What is 27? Number or string? Literals Answer: 27 is a plain literal here !!!!! What is 27? Number or string?

Plain and Typed Literals RDF has two kinds of literals: plain and typed Plain literals have a lexical form (their lexical value) and optionally a language tag, e.g: "27" , "Hello world"@en, "Bonjour le monde" @fr RDF typed literals are formed by pairing a string with a URIref for a particular XMLS datatype, e.g.: “27”^^http://www.w3.org/2001/XMLSchema#integer ”27"^^xsd:int

Data Types for Literals In practice, the most widely used data typing scheme is the one by XML Schema But any externally defined data typing scheme is allowed in RDF documents XML Schema predefines many data types E.g. Booleans, integers, floating-point numbers, times, dates, etc.

XMLSchema Datatypes http://www.w3.org/TR/xmlschema-2/

Qnames for URIrefs The ntriples notation results in very long lines We can use an XML qualified name (QName) w/o brackets for a full URI reference http://dbpedia.org/page/Alan_Turing dbp:Alan_Turing Qnames have a prefix that’s been assigned to a namespace URI, a colon and a local name How to assign a prefix to a URI varies by serialization The concepts of names and namespaces used in RDF originate in XML

Topics Basic concepts of RDF Vocabularies and modeling Resources, properties, values, statements, triples URIs and URIrefs RDF graphs Literals, qnames Vocabularies and modeling Vocabularies Blank nodes, data modeling, types, reification Lists, bags, collections Serialization of RDF graphs XML, Turtle, Ntriples Critique of RDF