Department of Artificial Intelligence

Slides:



Advertisements
Similar presentations
CH-4 Ontologies, Querying and Data Integration. Introduction to RDF(S) RDF stands for Resource Description Framework. RDF is a standard for describing.
Advertisements

The Semantic Web – WEEK 4: RDF
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.
Shelley Powers, O’Reilly SNU IDB Lab. Hyewon Kim
RDF Tutorial.
Quratulain Rajput Faculty of Computer Science, IBA Spring2013
Dr. Alexandra I. Cristea RDF.
Chapter 3A Semantic Web Primer 1 Chapter 3 Describing Web Resources in RDF Grigoris Antoniou Frank van Harmelen.
RDF Kitty Turner. Current Situation there is hardly any metadata on the Web search engine sites do the equivalent of going through a library, reading.
Chapter 7: Resource Description Framework (RDF) Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley,
Resource Description Framework Building the Semantic Web CS 431 – Carl Lagoze – Cornell University Acknowledgements: Eric Miller Dieter Fensel.
1 Introduction to Semantic Web with XML RDF Dickson K.W. Chiu PhD, SMIEEE Text: Antoniou & van Harmelen: A Semantic Web PrimerA Semantic Web Primer (Chapter.
Resource Description Framework ( RDF ) Xinxia An.
Module 2b: Modeling Information Objects and Relationships IMT530: Organization of Information Resources Winter, 2007 Michael Crandall.
LDK R Logics for Data and Knowledge Representation Resource Description Framework (RDF) Fausto Giunchiglia and Biswanath Dutta Fall’2011.
Resource Description Framework (RDF) Lecture # 6 Faculty of Computer Science, IBA.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
Visual Models for Knowledge Engineering Madalina Croitoru
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 Resource Description Framework (RDF) Feroz Farazi.
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.
Logics for Data and Knowledge Representation
RDF (Resource Description Framework). 2 Table of Contents  Introduction  Basic RDF –Basic RDF Model –Basic Syntax  Containers  Statements about Statements.
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.
Chapter 7: Resource Description Framework (RDF) Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley,
RDF Containers In N3, we could say that Ed (with id 21) and Bill (with id 34) created a certain document
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.
Understanding RDF. 2/30 What is RDF? Resource Description Framework is an XML-based language to describe resources. A common understanding of a resource.
Chapter 7: Resource Description Framework (RDF) Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley,
Important Concepts from the W3C RDF Vocabulary/Schema Sungtae Kim SNU OOPSLA Lab. August 19, 2004.
Description of Information Resources: RDF/RDFS (an Introduction)
RDF/RDFS Tutorial. Introduction The Resource Description Framework (RDF) is recommended by the World Wide Web Consortium (W3C) to model meta-data about.
Practical RDF Ch.4 Specialized RDF Relationships: Reification, Containers, and Collections Kim, Jong-Nam SNU OOPSLA Lab. August 12, 2004.
1cs The Need “Most of the Web's content today is designed for humans to read, not for computer programs to manipulate meaningfully.” Berners-Lee,
Doc.: IEEE /0169r0 Submission Joe Kwak (InterDigital) Slide 1 November 2010 Slide 1 Overview of Resource Description Framework (RFD/XML) Date:
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.
Practical RDF Chapter 4. Specialized RDF Relationships: Reification, Containers, and Collections Shelley Powers, O’Reilly SNU IDB Lab. Hyewon Lim.
Semantic web course – Computer Engineering Department – Sharif Univ. of Technology – Fall RDF & RDF Schema Machine Understandable Metadata for the.
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 –
Linked Data & Semantic Web Technology The Semantic Web Part 7. RDF Semantics Dr. Myungjin Lee.
8.3.7 Compound Property Values Property values can be ▫Literals ▫Resource ▫Container ▫Collection, or… ▫Compound Value Compound Value ▫Has multiple value.
Linked Data & Semantic Web Technology The Semantic Web Part 4. Resource Description Framework (1) Dr. Myungjin Lee.
Service-Oriented Computing: Semantics, Processes, Agents
Knowledge Representation Part VI
Charlie Abela Department of Intelligent Computer Systems
Knowledge Representation Part V RDF
Charlie Abela Department of Intelligent Computer Systems
Resource Description Framework - RDF
Service-Oriented Computing: Semantics, Processes, Agents
Resource Description Framework
Resource Description Framework
Service-Oriented Computing: Semantics, Processes, Agents
XML QUESTIONS AND ANSWERS
Some Other Useful Features of RDF
Grid Computing 7700 Fall 2005 Lecture 18: Semantic Grid
RDF For Semantic Web Dhaval Patel 2nd Year Student School of IT
Introduction to RDF and RDFS Editor: MR3
ece 720 intelligent web: ontology and beyond
Grid Computing 7700 Fall 2005 Lecture 18: Semantic Grid
Resource Description Framework (RDF)
Semantic Web Basics (cont.)
Presentation transcript:

Department of Artificial Intelligence RDF Charlie Abela Department of Artificial Intelligence charlie.abela@um.edu.mt

Last Lecture Introduced XPath and XQuery as languages that allow for accessing and extracting node information from XML Problems?

Lecture Outline Introduction to RDF Exercises Basic building blocks: resources Different notations for RDF Triples Graphs RDF/XML Reification Some examples Exercises

Moving up the layers

Scenario Jim’s searching experience over the Web is not brilliant It gets really frustrating at times when he needs to find relevant information AARRRGGHH….

Scenario (2) John is interested in music John keeps a favourites’ list of song titles Jim’s colleague John has recently started using an application called PEA (Personal Assistant) PEA can learn about the user’s interests and is able to help out John in many tasks. During its learning process PEA implicitly gathers information about John’s interests

Scenario (3) After some time observing John’s behaviour PEA has gathered some facts: John has a list of favourite songs List of favourite songs is ranked according to John’s preferences John’s favourite song is “I Feel Good” James Brown sings “I Feel Good” “I Feel Good” is a song A song has lyrics John is an instance of a Person James Brown is an instance of a Person “I Feel Good” video is found at http://www.youtube.com/watch?v=IWcNiebYGuo

Scenario (4) Internally PEA has a semantic representation of all the gathered facts

RDF Introduction Resource Description Framework is a language whose main intent is to provide a common framework for expressing machine-processable information Through RDF it is possible to represent both physically accessible entities, as well as abstract entities (i.e. those that cannot be retrieved) physical entity: a person’s Web page abstract entity: the resource pointing to information about the person himself It also facilitates information exchange between different applications

RDF: The Basics Basic building block: <object attribute value> triple It is called a statement Sentence: “Dan Brown is the author of the Da Vinci Code” is such a statement Object: Dan Brown Attribute: authorOf Value: Da Vinci Code RDF has been given an XML syntax This syntax inherits the benefits of XML Other syntactic representations of RDF are possible N3 (Notation 3): short hand, however less popular then XML version

RDF: The Basics (2) The fundamental components of RDF are: Resources: anything defined through a URI http://www.category.com/authors#Dan_Brown Properties: resources that describe a relation books:authorOf (authorOf relation defined in books domain) essentially binary relations Statements: assign a value to a property associated with a specific resource <#auth1102 books:authorOf “Da Vinci Code”>

Resources We can think of a resource as an object, a “thing” we want to talk about (i.e. has an identity) E.g. authors, books, publishers, places, people, hotels Every resource (physical or abstract) has a URI, a Universal Resource Identifier A URI can be a URL (Web address) http://www.bookresource.com/pub/books.html some other kind of unique identifier #book102 (references a unique book resource)

Properties Properties are special kinds of resources They describe relations between resources E.g. “written_by”, “age”, “title”, etc. Properties are also identified by URIs authorOf relation used in association with a book resource <books:authorOf rdf:resource=“#book102”/>

Statements RDF statements assert the properties of resources Values can be resources or literals Literals are atomic values (strings) Three views of an RDF statement as a triple as a directed graph as RDF/XML serialisation

Example: As a Triple <#auth1102 books:authorOf “Da Vinci Code”> The triple (x,P,y) can be considered as a logical formula P(x,y) Binary predicate P relates object x to object y RDF offers only binary predicates (properties) Any n-ary relation in RDF has to be converted into a set of binary relations subject resource property resource object value

Example: As a Graph A directed graph with labeled nodes and arcs from the resource (the subject of the statement) to the value (the object of the statement) Known in AI as a semantic net

<rdf:Description rdf:about="#auth1102"> RDF/XML An RDF document is represented by an XML element with the tag rdf:RDF The content of this element is a number of descriptions, which use rdf:Description tags. Every description makes a statement about a resource, usually identified in 2 ways: an about attribute, referencing an existing description an ID attribute, creating a new description <rdf:Description rdf:about="#auth1102">

RDF/XML (2) The rdf:Description element makes a statement about the resource auth1102 Within the description the property is used as a tag the content is the value of the property <authors:name>Dan Brown</authors:name> property value

Example: RDF/XML <rdf:RDF xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns:xsd=“http://www.w3.org/2001/XMLSchema#” xmlns:books=“http://www.booksInfo.com/books#” xmlns:authors=“http://www.authorsInfo.org/authors#”> <rdf:Description rdf:ID="auth1102"> <authors:name>Dan Brown</authors:name> <books:authorOf rdf:resource=“#book102”/> </rdf:Description> </rdf:RDF> QName Base: URI of the document itself Default: all unqualified terms used in the document that defines the bookstore ontology belong to this namespace

Concise representation <!DOCTYPE rdf:RDF [ <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#"> <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#"> <!ENTITY books “http://www.booksInfo.org/books#”> <!ENTITY authors “http://www.authorsInfo.org/authors#”> ]> <rdf:RDF xmlns:rdf ="&rdf;" xmlns:rdfs="&rdfs;" xmlns:xsd="&xsd;“ xmlns:authors=“&authors;” xmlns:books=“&books;”> <rdf:Description rdf:ID="auth1102"> <authors:name>DanBrown</authors:name> <books:authorOf rdf:resource=“#book102”/> </rdf:Description>

XML Schema data types In RDF, typed literals can be used Usually through the use of XML Schema In which case the XML Schema namespace has to be declared in the namespace block <rdf:Description rdf:ID=“auth1102”> <authors:name rdf:datatype=“&xsd;string”>Dan Brown </authors:name> <books:authorOf rdf:resource=“#book102”/> <authors:dob rdf:datatype=“&xsd;string”>22/06/1964 </authors:dob> </rdf:Description>

Using rdf:type Declare a statement which formally defines a description <rdf:Description rdf:ID=“auth1102”> <rdf:type rdf:resource=“&authors;author”/> <authors:name rdf:datatype=“&xsd;string”>Dan Brown</authors:name> <books:authorOf rdf:resource=“#book102”/> <authors:dob rdf:datatype=“&xsd;string”>22/06/1964</authors:dob> </rdf:Description> Declares auth1102 to be of type author (itself defined in the authors vocabulary)

Bookstore.rdf <rdf:RDF xmlns:rdf=“&rdf;” xmlns:xsd=“&xsd; xmlns:books=“&books;” xmlns:authors=“&authors;”> <rdf:Description rdf:ID=“book102”> <books:title rdf:datatype=“&xsd;string”>Da Vinci Code</books:title> <books:ISBN rdf:datatype=“&xsd;string”>978-0385504201</books:ISBN> </rdf:Description> <rdf:Description rdf:ID=“auth1102”> <rdf:type rdf:resource=“&authors;author”/> <authors:name rdf:datatype=“&xsd;string”>Dan Brown</authors:name> <books:authorOf rdf:resource=“#book102”/> <authors:dob rdf:datatype=“&xsd;string”>22/06/1964</authors:dob> </rdf:RDF>

XML Vs RDF XML RDF/XML <book ID=“book102”> <author ID=“auth1102” name=“Dan Brown”/> <title name=“Da Vinci Code”/> <ISBN>978-0385504201</ISBN> </book> XML <rdf:Description rdf:ID=“book102”> <books:title>Da Vinci Code</books:title> <books:ISBN>978-0385504201</books:ISBN> </rdf:Description> <rdf:Description rdf:ID=“auth1102”> <authors:name>Dan Brown</authors:name> <books:authorOf rdf:resource=“#book102”/> RDF/XML

XML vs RDF II

XML vs RDF III

Container Elements Collections of resources or attributes can be defined within a container element. RDF provides three types of containers: rdf:Bag an unordered container, may contain multiple occurrences rdf:Seq an order container, may contain multiple occurrences rdf:Alt a set of alternatives

Container Elements: Bag Dan Brown is the author of three books (defined elsewhere), order of publication is not important <rdf:Description rdf:ID=“auth1102”> <authors:name>Dan Brown</authors:name> <books:authorOf> <rdf:Bag> <rdf:li rdf:resource=“#book106”/> <rdf:li rdf:resource=“#book102”/> <rdf:li rdf:resource=“#book103”/> </rdf:Bag> </books:authorOf> </rdf:Description>

Container Elements: Seq However if its needed to specify that authorOf specifies ordering information (e.g. based on publication dates) <rdf:Description rdf:ID=“auth1102”> <authors:name>Dan Brown</authors:name> <books:authorOf> <rdf:Seq> <rdf:li rdf:resource=“#book102”/> <rdf:li rdf:resource=“#book103”/> <rdf:li rdf:resource=“#book106”/> </rdf:Seq> </books:authorOf> </rdf:Description>

Container Elements: Alt Alt implies a list of alternatives from which only one can be chosen <rdf:Description rdf:ID=“book102”> <books:title>Da Vinci Code</books:title> <books:ISBN>978-0385504201</books:ISBN> <book:language> <rdf:Alt> <rdf:li>engdoc</rdf:li> <rdf:li>mtdoc</rdf:li> </rdf:Alt> </book:language> </rdf:Description> rdf:li is equivalent to rdf:_1

Closed container If we need to specify that the listed resources are ALL the members of the container we need to use the List structure <books:authorOf> <rdf:List> <rdf:first> <rdf:Description rdf:about=“#book103”/> </rdf:first> <rdf:rest> <rdf:first <rdf:Description rdf:about=“#book102”/> <rdf:Description rdf:about=“&rdf;nil”/> </rdf:rest> </rdf:List> </books:authorOf>

Closed collection A shorthand syntax for a closed collection exists <rdf:Description rdf:ID=“auth1102”> <authors:name>Dan Brown</authors:name> <books:authorOf rdf:parseType=“Collection”> <rdf:Description rdf:about=“#book103”/> <rdf:Description rdf:about=“#book102”/> <books:authorOf> </rdf:Description>

Reification in RDF In RDF it is possible to make statements about statements <rdf:Description rdf:ID=“auth1102”> <authors:name rdf:datatype=“&xsd;string”>DanBrown</authors:name> </rdf:Description> Reifies as: <rdf:Statement rdf:ID=“auth102_S1”> <rdf:subject rdf:resource=“#auth1102”/> <rdf:predicate rdf:resource=“&authors;name”/> <rdf:object rdf:datatype=“&xsd;string”>DanBrown</rdf:object> </rdf:Statement> The four statements are sometimes referred to as a "reification quad" for this reason.

Reification Graph (1)

Use of Reification Reification can be used to declare the provenance of a particular statement E.g.: suppose that for the bookstore catalogue its important to verify who entered the data about authors Through reification its possible to say: <rdf:Description rdf:ID=“john_01”> <dc:creator rdf:resource=“#auth102_S1"/> </rdf:Description> <rdf:Statement rdf:ID=“auth102_S1”> <rdf:subject rdf:resource=“#auth1102”/> <rdf:predicate rdf:resource=“&authors;name”/> <rdf:object rdf:datatype=“&xsd;string”>DanBrown</rdf:object> </rdf:Statement>

Reification Example Graph (2)

Reification Problems To reify one RDF statement, four additional statements are needed. Leads to an explosion in the number or RDF statements.

Use of RDF: Describe Bookmarks <rdf:Description rdf:nodeID=“bk001”> <rdf:type rdf:resource=“&bookmarks;bookmark”/> <bookmarks:url rdf:resource=“http://news.google.com/”/> <bookmarks:date rdf:datatype=“&xsd;date”>12/12/07</bookmarks:date> <bookmarks:query rdf:datatype=“&xsd;string”>news + google </bookmarks:query> <bookmarks:title rdf:datatype=“&xsd;string”>Google News </bookmarks:title> <bookmarks:category rdf:datatype=“&xsd;string”>News</bookmarks:category> </rdf:Description> rdf:nodeID is used to indicate an anonymous node

Use of RDF: Describe a Process <rdf:Description rdf:nodeID=“proces001”> <rdf:type rdf:resource=“&process;sysprocess”/> <process:name rdf:datatype=“&xsd;string”>lsass</process:name> <process:ext rdf:datatype=“&xsd;string”>exe</process:ext> <process:folder>system32</process:folder> <process:version>5.1.2600.2180</process:version> <process:company>Microsoft Corporation</process:company> </rdf:Description>

Exercises Write the following statements in RDF and draw the associated graphs (use any required namespaces) The library is located in Bremen The book with title “Artificial Intelligence” and ISBN 978-123458 is written by the author Henry Wise The author William Start wrote the books with titles “Modern Web Services” and “Theory of Computation” The email address of lecturer John Brown is john.brown@widget.org Lecturer John Brown has an office in the Department of AI. The office is situated on the 2nd floor of the Computer Building. Write RDF statements about a catalogue of products. Each catalogue has an ID and a description and consists of a list of products Each product is associated with a department and has a product ID and a description Multiple products may be associated with the same department