Presentation is loading. Please wait.

Presentation is loading. Please wait.

Logics for Data and Knowledge Representation Resource Description Framework (RDF) Feroz Farazi.

Similar presentations


Presentation on theme: "Logics for Data and Knowledge Representation Resource Description Framework (RDF) Feroz Farazi."— Presentation transcript:

1 Logics for Data and Knowledge Representation Resource Description Framework (RDF) Feroz Farazi

2 RDF – the basis of the Semantic Web  Speaking of the “semantics” of a programming language  usually refers to the mapping  from the language syntax to some formalism that expresses the meaning  …to an abstract machine or...to some operational calculus  Speaking of the “semantics” of natural language  often refers to the mapping  from utterances or statements to what they mean  from a term in a statement to the thing (entity or concept…) in the world  This notion of semantics is known as referential semantics  This is the one that motivates the Semantic Web [D. Allemang and J. Hendler, 2008]

3 RDF – the basis of the Semantic Web  The Web that we are accustomed to  consists of documents that are linked to one another  lacks the notion of  entity (e.g., Shakespeare and Stratford)  concept (e.g., poet and location)  attribute (e.g., baptised on and date of death)  values (e.g., 26 April 1564 and 23 April 1616)  On the Semantic Web  all kinds of things are referred to as resources  the name of the base technology is RDF uses this word in an essential way  RDF is an acronym for Resource Description Framework

4 RDF  A language for representing Web resources and information about them in the form of metadata [RDF Primer]  A language to represent all kinds of things that can be identified on the Web [RDF Primer]  A domain independent data model for representing information on the Web [G. Antoniou and F.v. Harmelen, 2004]  A language with an underlying model designed to publish data on the Semantic Web [F. Giunchiglia et al., 2010] Definitions

5 RDF  Resource  A thing or a class or an entity we want to talk about  For example, web pages, articles, authors, etc.  Property  metadata of the resources to be described  For example, creator, date of creation, publisher, etc.  Statement  A piece of information about a resource represented using a property and a value  For example, Tim Berners-Lee authored Weaving the Web. In other words, Weaving the Web has an author (or creator) whose value is Tim Berners-Lee.  A subject (Weaving the Web)–predicate (creator)–object (Tim Berners-Lee) triple Keys

6 Statements  In RDF, statements become machine comprehensible as  Triple elements are represented in a form of machine processable identifiers  They are encoded in a machine processable language  Identifiers  URL: Uniform Resource Locator  URI: Uniform Resource Identifier  URI includes  Things that can be located on the web (using URL), e.g., a home page of a person  Things that are not web accessible, e.g., a real world concept or entity  Language  RDF defines a specific XML language called RDF/XML

7 RDF Data Model  A graph data model with directed edges  URIs to identify nodes (subject and object) and edges (predicate)  Objects can be literals: plain and typed GeoNames has coverage of all countries GeoNames was modified on April 25, 2009

8 Distributing Data Across the Web  Data are often represented in tabular form where  each row represents some item  each column represents some property of those items  the cells in the table are the particular values for those properties  Some data about works around the time of Shakespeare  Data Distribution  over many machines  each maintains a part  row by row  column by column  cell by cell  Row distribution: queries about an entity can be answered by the machine that stores its corresponding row  The following table shows a sample of some data about works completed around the time of Shakespeare IDTitleAuthorMediumYear 1HamletShakespearePlay1599 2OthelloShakespearePlay1604 3Edward IIC. MarlowePlay1592 4Hero and Leander C. MarlowePoem1593

9 Distributing Data Across the Web  Row distribution  provides considerable flexibility as machines can share the load of representing information about several entities  requires some coordination between the machines  sharing information about the columns  which property each column corresponds to  needs a common schema  Column Distribution  allows each machine to be responsible for some kind of information, e.g., title and year, and author and medium  requires coordination between the machines for the identification of the entities  needs a global identifier for each entity

10 Distributing Data Across the Web  Cell distribution  is a combination of the other two distributions  requires each machine to be responsible for some cells  allows two machines to share  the information about a single entity  the use of a particular property  provided flexibility is required if we want our data distribution system to support the AAA slogan  however, combines the costs of the other two strategies and some more  a global identifier for the column headings  a global identifier for the row headings  a global identifier for non-literal values  is the strategy taken by RDF

11 RDF Representations  The graph is a powerful tool for the understanding of the people  For the Semantic Web we need machines to understand and process  Simple statements are represented as triples in RDF/XML  RDF statements have similarity to  The entries in the data processing systems  The rows in the relational database tables  The assertions in logic languages  An RDF document  Contains an element enclosed in XML tag rdf:RDF  A set of descriptions can be defined within this element with the tag rdf:Description  Each description makes a set of statements about a resource, where  The resource can be defined newly with rdf:ID  It can refer to an existing resource with rdf:about

12 RDF Representations  Structured attributes (e.g., address) can be represented  Blank nodes or anonymous resources are used  Group of things (e.g., a conference participants) can be represented  RDF Containers can be used  Constructs are rdf:Bag, rdf:Seq, rdf:Alt  Container content are called members, which are listed using rdf:li  RDF Collections can be used  Can represent a close list overcoming the limitation of Containers  Constructs are rdf:List, rdf:first, rdf:rest, rdf:nil  Provenance of the statements (e.g., who, when) can be represented  RDF Reification is the means to represent statements about statements  Constructs are rdf:Stament, rdf:subject, rdf:predicate and rdf:object

13 XML Syntax for RDF  RDF/XML: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dc="http://purl.org/dc/terms#"> GeoNames April 25, 2009

14  In the following it represents the fact that “the item 10245 (basically a tent) has weight 2.4 (in some measuring unit, e.g., kg)” and “the staff with id 85740 has written this statement” ]> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:exterms="http://www.example.com/terms/" xml:base="http://www.example.com/2002/04/products"> 2.4 2.4 RDF Reification Below the URI triple12345 is used to identify the original statement provided above

15 RDF Schema (RDFS)  A language for depicting the vocabulary of RDF developed to describe resources and relations between them [RDF Schema]  A language defined to provide mechanisms to add semantics to RDF resources [RDF Schema]  From the type system (classes and properties) perspective it has similarity to the object-oriented programming (OOP) paradigm  Differs from this paradigm in terms of defining classes and properties  In OOP, usually, classes are defined with respect to the properties an instance may have  In RDF Schema properties are defined with respect to the classes of the resources they can be attached to

16 Query Engine Database Application Query Engine RDF Store (merge) Application RDF Files Unstructured formats (Web pages), Structured formats (CSV, Excel and Databases) Parser Serializer Converters and scrapers Application: RDF vs Database  Both applications have  A query engine  A storage  RDF applications also have  parser, serializer, converter and scraper  RDF merge functionality  Some example applications are calendar integration, map integration and annotation [D. Allemang and J. Hendler, 2008]

17 RDF Inferencing  Dumb data:  Given that John hits the webpage of an online clothing retailer  His search for “chamois” in the category of “Shirts” returns nothing  Though in the paper catalog found in his mailbox he saw a chamois Henley  Also “Shirts” has a subcategory “Henleys”, which contains chamois  What do we expect here in this case to make it smarter  any search or query to the data that references “Shirts” to also look at “Henleys”  what is so special about the relationship between them to make expect this?  how can we express this meaning in a way that is consistent and maintainable?  an iterative query can be a solution in conventional database applications  Such as show me all the all items in category “Shirts”, or in any subcategory of it, or any sub-sub category of it, an so on

18 RDF Inferencing  Smart data:  the Semantic Web contrasts to the iterative or program loop query approach  the Semantic Web provides a model of data expression that allows for explicit representation of the relationship between data items  in this sense, it allows a data modeler to create data that are  more connected  better integrated  smarter  In smart (smarter) data the consistency constraints on the data can be expressed in the data itself  Consistency constraints can be checked through inferencing  inferencing means that given some stated information, it can determine other, related information that can also be considered as if it had been stated  with smart data, it means that the data can describe something about the way they should be used

19 RDF Inferencing  In RDFS, semantics can be expressed through inferences  It allows type (rdf:type) propagation through rdfs:subClassOf :Fausto_Giunchigliardf:type :Prfoessor :Professorrdfs:subClassOf:Faculty :Fausto_Giunchigliardf:type:Faculty (inferred)  It allows relationship propagation through rdfs:subPropertOf :prfoessorshipAtrdfs:subProperytOf:affiliationWith :Fausto Giunchiglia:professorshipAt:UniTN :Fausto_Giunchiglia:affiliationWith:UniTN (inferred)  It allows type identification through rdfs:domain :professorshipAtrdfs:domain:Person :Fausto_Giunchiglia:professrshipAt:UniTn :Fausto_Giunchigliardf:type:Person

20 RDF Inferencing  It allows type identification through rdfs:range :professorshipAtrdfs:range:Educational_Institution :Fausto_Giunchiglia:professrshipAt:UniTn :UniTnrdf:type:Educational_Institution (inferred)  Inferencing through rdfs:domain and rdfs:subClassOf :Researcherrdfs:subClassOf:Scientist :hIndexrdfs:domain:Researcher :Fausto_Giunchiglia:hIndex44 :Fausto_Giunchigliardf:type:Researcher (inferred) :Fausto_Giunchigliardf:type:Scientist (inferred)  Inferencing through rdfs:range and rdfs:subClassOf :Educational_Institutionrdfs:subClassOf:Organization :professorshipAtrdfs:range: Educational_Institution :Fausto_Giunchiglia:professorshipAt :UniTn :UniTnrdf:type:Educational_Institution (inferred) :UniTnrdf:type:Organization (inferred)

21 RDF Modeling  Modeling (logical) Set Intersection in RDF  Can we represent that “If an entity e is in X, it is also in both Y and Z”?  No explicit modeling construct is provided to do that but Can be modeled as: X rdfs:subClassOf Y X rdfs:subClassOf Z e rdf:type X e rdf:type Y (inferred) e rdf:type Z (inferred)  Modeling (logical) Set Union in RDF  Can we represent “Any entity e that belongs either to Y or Z also belongs to X”?  No explicit modeling construct is provided to do that but Can be modeled as: Y rdfs:subClassOf X Z rdfs:subClassOf X e rdf:type Y or e rdf:type Z e rdf:type X (inferred)

22 References  RDF Primer (2004). W3C Recommendation.  RDF Schema (2004). W3C Recommendation.  G. Antoniou & F. van Harmelen (2004). A Semantic Web Primer (Cooperative Information Systems). MIT Press, Cambridge MA, USA.  F. Giunchiglia, F. Farazi, L. Tanca, and R. D. Virgilio. The semantic web languages. In Semantic Web Information management, a model based perspective. Roberto de Virgilio, Fausto Giunchiglia, Letizia Tanca (Eds.), Springer, 2009.  D. Allemang and J. Hendler. Semantic web for the working ontologist: modeling in RDF, RDFS and OWL. Morgan Kaufmann Elsevier, Amsterdam, NL, 2008.


Download ppt "Logics for Data and Knowledge Representation Resource Description Framework (RDF) Feroz Farazi."

Similar presentations


Ads by Google