Presentation is loading. Please wait.

Presentation is loading. Please wait.

Co-funded by the European Union Semantic CMS Community The Semantic Web – Part 1 The Vision and Basic Technologies of the Semantic Web. Copyright IKS Consortium.

Similar presentations


Presentation on theme: "Co-funded by the European Union Semantic CMS Community The Semantic Web – Part 1 The Vision and Basic Technologies of the Semantic Web. Copyright IKS Consortium."— Presentation transcript:

1 Co-funded by the European Union Semantic CMS Community The Semantic Web – Part 1 The Vision and Basic Technologies of the Semantic Web. Copyright IKS Consortium 1 Lecturer Organization Date of presentation

2 Page: 2 Copyright IKS Consortium Content Management The Semantic Web Storing and Accessing Semantic Data Semantic Lifting Knowledge Representation and Reasoning Knowledge Interaction and Presentation Part I: Foundations Part II: Semantic Content Management Designing Interactive Ubiquitous IS Semantifying your CMS Reference Architecture for Semantic CMS Requirements Engineering for Semantic CMS Part III: Methodologies

3 Page: What is this Lecture about?  Semantic web technologies as a possible solution for improving the „state of play“ in content management by making semantics expressable in machine-readable way  The Semantic Web  The vision behind the semantic web  Underlying technologies of the Semantic Web Copyright IKS Consortium 3 Content Management The Semantic Web Part I: Foundations

4 Page: Web evolution Slide by Nova Spivack, Radar Networks Web 1.0 Web 2.0 Web 3.0 Web Copyright IKS Consortium

5 Page: The Semantic Web  The vision of the Semantic Web has been originally proposed by Tim Berners-Lee  “The Semantic Web is not a separate Web but an extension of the current one, in which information is given well-defined meaning, better enabling computers and people to work in cooperation.” [The Semantic Web, 2001]  Standardized specification techniques for the semantic annotation of content (RDF, OWL,...) Copyright IKS Consortium 5

6 Page: Semantic Web Stack  W3C provides standardized specifications for Semantic Web technologies  Semantic Web Layer Cake as a conceptual architecture describes an hierarchy of languages  Each layer exploits and uses capabilities of the layers below Copyright IKS Consortium Semantic Web Layer Cake, Image source: 6

7 Page: Unique Identification of Resources  “...more fundamental than either HTTP or HTML are URIs, which are simple text strings that refer to Internet resources -- documents, resources, people, and indirectly to anything. URIs are the glue that binds the Web together. IRIs extend and strengthen the glue, by allowing people to identify Web resources in their own language.”  In a “Web of Data” the unique identification of entities is required Copyright IKS Consortium 7

8 Page: How to identify resources?  URI – Uniform Resource Identifier [RFC 3986]  “A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource.”  A URI consists of five parts: scheme, authority, path, query and fragment  URI = scheme ":" authority "/" path [ "?" query ] [ "#" fragment ]  Example: Copyright IKS Consortium 8 scheme authority path queryfragment

9 Page: How to identify resources?  IRI – Internationalized Resource Identifier [RFC 3987]  “IRIs are defined similarly to URIs in [RFC3986], but the class of unreserved characters is extended by adding the characters of the UCS (Universal Character Set, [ISO10646])..”  Extends the character set used by URIs and thereby allows the consideration of language specific syntaxes (e.g. Japanese, Chinese,...)  Example  Logical Hebrew  ASCII notationhttp://ab.CDEFGH.ij/kl/mn/op.html Copyright IKS Consortium 9

10 Page: Structuring Data  XML – Extensible Markup Language  XML can be used to specify the syntactical structure of documents or complex data objects in a machine-readable form Copyright IKS Consortium 10 Jaguar XF L V8 Petrol

11 Page: Why isn´t XML enough?  XML tags are only defining the structure of a document  For a machine the tags have no semantics! Copyright IKS Consortium 11 Jaguar... Jaguar... The difference in meaning is only recognized by a human.

12 Page: Why isn´t XML enough?  The relation among the different tags is not expressed explicitly Copyright IKS Consortium 12 Jaguar... The relation between “car”, “brand” and “Jaguar” is only recognizable by a human.

13 Page: What do we need?  We want to express the statement:  “The brand of the car is Jaguar.”  We need... ...a way to address the concrete resource car. ... to express the property brand of the resource car. ... to define the property value Jaguar for the property brand. Copyright IKS Consortium 13

14 Page: Resource Description Framework (RDF)  “The Resource Description Framework (RDF) identifies things using Web identifiers (URIs), and describes resources with properties and property values.”  A Resource is an object that can be identified by an URI, e.g. “http://example.org/Car”.  A Property describes an aspect of a resource, e.g. “http://example.org/Brand”. The property is also identified by an URI.  The Property value assigns a concrete value to a property, e.g. “Jaguar” or ““http://example.org/Jaguar”. Copyright IKS Consortium 14

15 Page: RDF Statements  RDF statements consist of subject (resource), predicate (property) and object (property value)  Subjects (except Blank Nodes) and Predicates are always defined by URIs  Objects can be defined by URIs and literals Copyright IKS Consortium 15 Subject Object ( URI ) Predicate Object (literal) Predicate

16 Page: RDF Statements - Example  Exemplary statements:  “The brand of the car is Jaguar.”  “The model of the car is XF.” Copyright IKS Consortium 16 XF SubjectPredicateObject Predicate

17 Page: Resource Description Framework (RDF)  “The Resource Description Framework (RDF) is a language for representing information about resources...” [RDF Primer] W3C Standard (http://www.w3.org/RDF)  RDF provides a graph-based data model  for representing metadata  for describing the semantics of information in a machine-accessible way Copyright IKS Consortium 17

18 Page: RDF Serialization Formats  RDF/XML  N3  N-Triples  TRiG  TRiX  Turtle  JSON  JSON-LD  RDFa Copyright IKS Consortium 18

19 Page: RDF/XML  RDF/XML is the most common serialization format for RDF statements  Example: Copyright IKS Consortium XF 19

20 Page: Root Element and Namespaces Copyright IKS Consortium .... Root element of RDF documents xmlns:rdfSpecifies that elements with the “rdf” prefix are using the namespace “..” xmlns:abcSpecifies that elements with the “abc” prefix are using the namespace “..” Root element of the RDF/XML document. Defined namespaces 20

21 Page: Description Element Copyright IKS Consortium 21 Introduces node element (subject). Defines the URI reference for the node element. Node element Assigns a resource to the node element.

22 Page: Objects defined by Resources  Assigning resources to objects (property values) in RDF/XML Copyright IKS Consortium 22 The object is defined by a resource. Defines predicate “Brand” in namespace “rel”.

23 Page: Objects defined by Literals  Definition of objects (properties) with constant values (literals) Copyright IKS Consortium 23 XF XF The object is defined by a literal.

24 Page: RDF Container Elements  “A container is a resource that contains things. The contained things are called members. The members of a container may be resources (including blank nodes) or literals.”  Container provide the ability to describe groups of things, e.g. several authors of a book  RDF defines three types of containers:  Bag  Sequence  Alternatives Copyright IKS Consortium 24

25 Page: Container Element - Bag  “A Bag (a resource having type rdf:Bag) represents a group of resources or literals, possibly including duplicate members, where there is no significance in the order of the members.”  Example:  Describe equipment features of the car. Copyright IKS Consortium 25

26 Page: Container Element - Bag Copyright IKS Consortium 2/22-rdf-syntax-ns#Bag io ating Blank Node 26

27 Page: Container Element - Bag Copyright IKS Consortium Defines predicate “xyz” in namespace “x”. Defines a container of type “Bag”. Defines members of the Bag container. The subject “Car” is described by the predicate “equipment”. The different members of the Bag container are listed. The object is a container of type “Bag” 27

28 Page: Container Element - Sequence  “A Sequence or Seq (a resource having type rdf:Seq) represents a group of resources or literals, possibly including duplicate members, where the order of the members is significant.”  Example:  Describe a list of previous owners of the car in chronological order. Copyright IKS Consortium 28

29 Page: Container Element - Sequence Copyright IKS Consortium 2/22-rdf-syntax-ns#Seq oe ller House

30 Page: Container Element - Sequence Copyright IKS Consortium Defines predicate “xyz” in namespace “x”. Defines a container of type “Sequence”. Defines members of Sequence container. The subject “Car” is described by the predicate “preOwners”. The different members of the Sequence container are listed. The object is a container of type “Sequence”. 30

31 Page: Container Element - Alternative  “An Alternative or Alt (a resource having type rdf:Alt) represents a group of resources or literals that are alternatives (typically for a single value of a property).”  Example:  Describe a list of possible colors of the car. Copyright IKS Consortium 31

32 Page: Container Element - Alternative Copyright IKS Consortium /22-rdf-syntax-ns#Alt

33 Page: Container Element - Alternative Copyright IKS Consortium 33

34 Page: RDF Collections  A RDF Container can be used to define groups, but lacks the ability to “close” them. That means to define that "these are all the members of the container".  RDF Collections provide the ability to describe groups, that contain only the specified resources.  “An RDF collection is a group of things represented as a list structure in the RDF graph.”  Example:  All equipment features of a car. Copyright IKS Consortium 34

35 Page: RDF Collection Copyright IKS Consortium /22-rdf-syntax-ns#nil dio eating

36 Page: RDF Collection Copyright IKS Consortium 36 Defines that the predicate “xyz” is described by a collection. The predicate “equipment” is described by a Collection.

37 Page: Validation Tool Copyright IKS Consortium 37

38 Page: Semantic Layer Web Cake Copyright IKS Consortium 38 Semantic Web Layer Cake, Image source: Unique identification of resources Unique identification of resources A format for specifying structured data in a machine-readable form A model for describing resources with properties and property values.

39 Page: RDF  RDF provides a model for describing resources with properties and property values. Copyright IKS Consortium ex:. ex:Car1ex:Brandex:Jaguar ex:Car1ex:Colour“Black” ex:Car2ex:Brandex:Jaguar ex:Car2ex:Colour“White” ex:Car3ex:Brandex:VW ex:Car3ex:Colour“Black” How do I get all black Jaguars?

40 Page: SPARQL  SPARQL Protocol and RDF Query Language  W3C Recommendation since 2008  SPARQL provides a standard for querying information, that is specified in RDF  SPARQL consists of three specifications  Query language  Query results XML format  Data access protocol Copyright IKS Consortium 40

41 Page: Exemplary SPARQL Query “Return the models and prices for all cars of brand ‘Jaguar’ ” SPARQL Query: Exemplary Result: Copyright IKS Consortium 41 PREFIXex: SELECT?model ?price WHERE { ?carex:Brand ex:Jaguar. ?carex:Model?model. ?carex:Price?price. } ModelPrice “XJ”“79.750,00” “XF”“44.900,00” Declares namespaces for abbreviated resources identifiers. Identifies the variables to appear in the query results. Provides the basic graph pattern to match against the data graph.

42 Page: Basic Graph Patterns (BGP)  A SPARQL query contains a set of triple patterns called a basic graph pattern  Triple patterns are like RDF triples except that each of the subject, predicate and object may be a variable.  A basic graph pattern matches a subgraph of the RDF data when RDF terms from that subgraph may be substituted for the variables and the result is a RDF graph equivalent to the subgraph. Copyright IKS Consortium 42 WHERE { ?carex:Brand ex:Jaguar. ?carex:Model?model. ?carex:Price?price. } Variables are defined by “?varname” or “$varname”

43 Page: Group Graph Patterns  “For a Group Graph Pattern, a set of graph patterns must all match”  In a SPARQL query string, a group graph pattern is delimited with braces: {...} Copyright IKS Consortium 43 PREFIXex: SELECT?model ?price WHERE { { ?car ex:Brand ex:Jaguar. ?car ex:Model ?model. } ?car ex:Price ?price. }

44 Page: Optional Pattern Matching  Basic graph patterns allow applications to make queries where the entire query pattern must match.  It is useful to be able to have queries that allow information to be added to the solution where the information is available, but do not reject the solution because some part of the query pattern does not match.  If the optional part does not match, it creates no bindings but does not eliminate the solution. Copyright IKS Consortium 44

45 Page: Optional Pattern Matching  Example:  Result Copyright IKS Consortium 45 PREFIXex: SELECT?model ?price WHERE { ?car ex:Brand ex:Jaguar. ?car ex:Model ?model. OPTIONAL { ?car ex:Price ?price. } } ModelPrice “XJ”“79.750,00” “XF”“44.900,00” “S-Type”

46 Page: Scope of Filters  “A constraint, expressed by the keyword FILTER, is a restriction on solutions over the whole group in which the filter appears.”  Result: Copyright IKS Consortium 46 PREFIXex: SELECT?model ?price WHERE { ?carex:Brand ex:Jaguar. ?carex:Model?model. ?carex:Price?price. FILTER (?price < ,00) } ModelPrice “XF”“44.900,00”

47 Page: Unary Operators (1/2) Copyright IKS Consortium 47 OperatorType(A)Result Type BOUND(A)variablexsd:boolean IsURI(A)RDF termxsd:boolean isBLANK(A)RDF termxsd:boolean isLITERAL(A)RDF termxsd:boolean

48 Page: Unary Operators (2/2) Copyright IKS Consortium 48 OperatorType(A)Result Type STR(A)literalsimple literal STR(A)URI / IRIsimple literal LANG(A)literalsimple literal DATATYPE(A)typed literalURI / IRI DATATYPE(A)simple literalURI / IRI

49 Page: Binary Operators (1/2) Copyright IKS Consortium 49 OperatorType(A)Type(B)Result Type A = B numeric simple literal xsd:string xsd:boolean xsd:dateTime numeric simple literal xsd:string xsd:boolean xsd:dateTime xsd:boolean A != B A < B A > B A <= B A >= B

50 Page: Binary Operators (2/2)  Filter can be combined by “&&” or “||” Copyright IKS Consortium 50 OperatorType(A)Type(B)Result Type sameTERM (A,B) RDF term xsd:boolean langMATCHES (A,B) simple literal xsd:boolean REGEX (A,B) simple literal xsd:boolean

51 Page: Alternative Graph Patterns  “SPARQL provides a means of combining graph patterns so that one of several alternative graph patterns may match. If more than one of the alternatives matches, all the possible pattern solutions are found.”  Pattern alternatives are syntactically specified with the UNION keyword. Copyright IKS Consortium 51 PREFIXex: SELECT?office WHERE { ?x rdf:type ex:CarManufacturer. { ?x ex:Headquarter ?office. } UNION { ?x ex:Office ?office. } }

52 Page: Solution Sequences and Modifiers  “Query patterns generate an unordered collection of solutions. These solutions are then treated as a sequence (a solution sequence), initially in no specific order; any sequence modifiers are then applied to create another sequence.”  There are several use cases in which the results shall be presented in a defined order, e.g. alphabetical order  Shall duplicates be presented or deleted? Copyright IKS Consortium 52

53 Page: Order By  “Following the ORDER BY clause is a sequence of order comparators, composed of an expression and an optional order modifier (either ASC() or DESC()). Each ordering comparator is either ascending (indicated by the ASC() modifier or by no modifier) or descending (indicated by the DESC() modifier).” Copyright IKS Consortium 53 PREFIXex: SELECT?constructionYear ?price WHERE{ ?carex:Brand ex:Jaguar. ?carex:ConstructionYear ?constructionYear. ?carex:Price ?price. } ORDER BY DESC(?constructionYear) ?price.

54 Page: Some more Solution Sequence Modifiers  LIMIT  “The LIMIT clause puts an upper bound on the number of solutions returned. If the number of actual solutions is greater than the limit, then at most the limit number of solutions will be returned.”  OFFSET  “OFFSET causes the solutions generated to start after the specified number of solutions. An OFFSET of zero has no effect.”  SELECT DISTINCT  “The DISTINCT solution modifier eliminates duplicate solutions. Duplicates are eliminated before either limit or offset is applied.” Copyright IKS Consortium 54

55 Page: Semantic Web Layer Cake Copyright IKS Consortium 55 Semantic Web Layer Cake, Image source: Unique identification of resources Unique identification of resources A format for specifying structured data in a machine-readable form A model for describing resources with properties and property values. A language for querying information specified in RDF.

56 Page: Lessons Learned  Now you should know... ... the general idea of the Semantic Web and the differences to the World Wide Web. ... the underlying technologies of the Semantic Web. ... how resources can be identified and specified. .. the importance of XML for expressing data in a machine- readable way. ... the concept of the RDF and the way it is expressed (e.g.: RDF/XML). ... how SPARQL can used to query data specified in RDF. Copyright IKS Consortium 56

57 Page: References and Additional Material  Introduction to RDF   RDF Syntax Specification   RDF Validation Tool  Copyright IKS Consortium 57


Download ppt "Co-funded by the European Union Semantic CMS Community The Semantic Web – Part 1 The Vision and Basic Technologies of the Semantic Web. Copyright IKS Consortium."

Similar presentations


Ads by Google