Your SlideShare is downloading. ×

Wissenstechnologie Iii 08 09


Published on

RDFS, Ontologies and Semantics

RDFS, Ontologies and Semantics

Published in: Education, Technology
1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Wissenstechnologie WS 08/09 Michael Granitzer IWM TU Graz & Know-Center Know Center http://kmi tugraz at http://www know center at This work is licensed under the Creative Commons Attribution 2.0 Austria License. To view a copy of this license, visit
  • 2. Today The Semantic Web h b Stack (rep ) (rep.) Semantics & Ontologies RDF S h Schema (RDFS) 2 WS 08/09 Wissenstechnologie @
  • 3. The Semantic Web Stack (rep.) Definition „Semantic Web“ The Semantic Web is an extension of the current Web in which information is given well-defined meaning, better enbaling computers and people to work in cooperations. [Berners-Lee et al. 2001] 10D2 1C70 84A9809EC588EF21 10D2-1C70-84A9809EC588EF21 3 WS 08/09 Wissenstechnologie @
  • 4. The Semantic Web Stack (rep.) The Vision as Application Scenario Plan a trip via the internet using your personal agent Agent searches automatically for Suitable flight Suitable hotels Alternative routes Also, the software agent tells you why it made this decision! 4 WS 08/09 Wissenstechnologie @
  • 5. The Semantic Web Stack (rep.) How to Express Semantics A small example John Lennon Is A Is Member Band The B tl Th Beatles Is Member Paul McCartney Founded in Is born in Query: all bands from England Ist in Liverpool England ?All bands with English artists? Inferenz & Reasoning: 5 English i P h i E li h artists := Person who is an artist and born in England i db i E l d WS 08/09 Wissenstechnologie @
  • 6. The Semantic Web Stack (rep.) Semantic Web Stack a.k.a. SW Layer Cake y a.k.a. SW Tower 6 WS 08/09 Wissenstechnologie @
  • 7. The Semantic Web Stack (rep.) Semantic Web Stack Unicode URI 7 WS 08/09 Wissenstechnologie @
  • 8. The Semantic Web Stack (rep.) Semantic Web Stack XML XML Schema Namespaces 8 WS 08/09 Wissenstechnologie @
  • 9. The Semantic Web Stack (rep.) Drawbacks of XML 9 WS 08/09 Wissenstechnologie @
  • 10. The Semantic Web Stack (rep.) Drawbacks of XML No semantic/meaning of tags Tree-like structure makes it hard to combine decentral stored information <Person> <lecture> <name> x</name> <name> x</name> / <lecture> <Person> … … </lecture> </Person> / </Person> </lecture> 10 WS 08/09 Wissenstechnologie @
  • 11. The Semantic Web Stack (rep.) Semantic Web Stack RDF 11 WS 08/09 Wissenstechnologie @
  • 12. The Semantic Web Stack (rep.) Goal of RDF Description of (Web) resource via metadata Historically focused on web sites E t d d t „general“ resources Extended to l“ For Classification of resources Classification of relationships between resources Unambigious description 12 WS 08/09 Wissenstechnologie @
  • 13. The Semantic Web Stack (rep.) RDF Statements (Triples) A small example htt // iki di / iki/J h L http://dbpedia org/property/associatedActs rdfs:label „Paul McCartney“ Subject j Predicate Object j ohn_Lennon ssociatedActs he_Beatles aul_McCartney ssociatedActs he_Beatles Rdfs:label “Paul McCartney” 13 aul_McCartney WS 08/09 Wissenstechnologie @
  • 14. The Semantic Web RDF – Serialisation Stack (rep.) Turtle Example - Extended # Define some namespaces @prefix rdf: <> . @prefix dc: <> . @prefix ex: <http://example org/terms/> . <> <> dc:creator <> . # write all statements in short form <> ex:name quot;John Smithquot;; ex:age quot;27quot; . 14 WS 08/09 Wissenstechnologie @
  • 15. The Semantic Web Stack (rep.) RDF Extended Concepts Blank Nodes Container & Collections Reification Syntactical abbreviations, no extension of expressiveness But how to define meaning? 15 WS 08/09 Wissenstechnologie @
  • 16. Semantics & Ontologies Ontologies & Semantics What is an Ontology? Greek: „The study of being“ The being Branch of Philosophy W can narrow it d We down t th d fi iti to the definition of concepts i f t in the world and their relationship 16 WS 08/09 Wissenstechnologie @
  • 17. Semantics & Ontologies Ontologies What are Concepts in our purpose? Semiotic Triangle [Ogden & Richards 1923] Concept Refers to Symbolizes Term / Word Thing /URI Stands for St d f ‚Apache‘ 17 WS 08/09 Wissenstechnologie @
  • 18. Semantics & Ontologies Ontologies & Semantics How to describe concepts? Intensional Description: Conditions and properties of a concept Natural World: textual summary y Logics: – NNecessary and sufficient conditions d ffi i di i – constraints on things Extensional Description: List of all objects belonging to a p j g g concept 18 WS 08/09 Wissenstechnologie @
  • 19. Semantics & Ontologies Ontologies & Semantics Example: Mammal Intension •isA(Vertebrate Animal) •has(Sweat glands) •withFunction(Milk) •withFunction(hair) •.... Extension •Elephant •Lion •Monkey Monkey •.... 19 WS 08/09 Wissenstechnologie @
  • 20. Semantics & Ontologies Ontologie (Gruber) Definition in Computer Science explicit specification of a conceptualization conceptualization is an abstract, simplified view of p , p the world that we wish to represent for some purpose Definitions associate the names of entities in the universe of discourse with human readable text human-readable describing what the names mean, and formal axioms that constrain the interpretation and well-formed use of these terms terms. Formally, an ontology is the statement of a logical theory 20 WS 08/09 Wissenstechnologie @
  • 21. Semantics & Ontologies Ontologie (Gruber) Ontologies are often equated with taxonomic hierarchies of classes, but class definitions, and the subsumption relation, but ontologies need not be limited to these forms. … To specify a forms conceptualization one needs to state axioms that do constrain the possible interpretations for the d fi d terms. defined t 21 WS 08/09 Wissenstechnologie @
  • 22. Semantics & Ontologies Ontologie (Guarino) Language vs. Conceptualization An ontology is a logical theory accounting for the gy g y g intended meaning of a formal vocabulary, i.e. its ontological commitment to a particular conceptualization of the world. The intended models of a logical language using such a vocabulary are constrained by its ontological commitment. An ontology indirectly reflects this commitment (and the underlying conceptualization) by h d d d l approximating these intended models. an ontology is language-dependent a conceptualization is language-independent 22 WS 08/09 Wissenstechnologie @
  • 23. Semantics & Ontologies Ontologie (Sowa) Formalization level of Ontologies An informal ontology may be specified by a catalog of types that are either undefined or defined d fi d only b statements in a natural l l by t t t i t l language. A formal ontology is specified by a collection of names for concept and relation types organized in a partial ordering by the type-subtype relation. 23 WS 08/09 Wissenstechnologie @
  • 24. Semantics & Ontologies Ontologie (Obrst) With respect to definitions of ontologies, I hope to send a portion of a briefing I made at the Army Knowledge Management Conference in Ft. Lauderdale late Aug/early Sept of 2004, that takes you through the ontology spectrum, from taxonomy (weak spectrum and strong) to thesaurus (a strong term taxonomy) to conceptual model (weak ontology) to logical theory (strong ontology). The first is unstandardized the second and third each has a unstandardized, set of standards associated with them, the third and fourth have multiple representation languages supporting them, and the last has some logic behind the representation language, typically ranging from a description logic (OWL) to first-order first order logic (KIF, Common Logic) to a higher order logic. A logical theory is a formal ontology. The others range from informal to semi-formal. Other informal ontologies can be document. natural language sentences in a document The key point about formal ontologies (logical theories) is that they are machine-interpretable, i.e., semantically interpretable by machine. The others are not, are only interpretable by 24 human beings, though they may be machine-readable and machine readable machine-processable. WS 08/09 Wissenstechnologie @
  • 25. Semantics & Ontologies Summary of Definitions A Ontology is a model (of the world) t l A ontology d ib describes a particular (k ti l (knowledge) d l d ) domain i A ontologie defines words/terms/signs for describing Concepts A ontologie puts concepts into relation to each other A ontologie uses axioms to put constraints on particular concepts 25 WS 08/09 Wissenstechnologie @
  • 26. Semantics & Ontologies Components of an Ontology Classes general things of a domain Instances special things of a domain R l ti Relations b t between thi things Properties of things 26 WS 08/09 Wissenstechnologie @
  • 27. Semantics & Communication Semantics & Ontologies Why do we need Ontologies in the Web? Java based C# based Exchange Semantics Intelligent Agent on the basis of an Intelligent Agent agreed Ontology Q: Is Paul McCartney member of a Rock Band? 27 WS 08/09 Wissenstechnologie @
  • 28. Semantics & Ontologies Semantics & Communication Language must allow to express the semantics in an implementation/algorithmic independent way Usually done via a Vocabulary Topic oriented vocabulary (e.g. Friend of a friend) Schema Knowledge/Terminological Knowledge g g g – Special vocabulary to make statements over topic oriented vocabulary (i.e. the termonologie used in a domain) – A general set of rules independent of the domain – Defines the expressiveness of a language 28 WS 08/09 Wissenstechnologie @
  • 29. Semantics & Ontologies Semantics & Communication Example Topic Vocabulary: Elephant, Mammal, Animal Schema: isSubClassOf defines an transitiv IS-A relationship IS A Define that: isSubClassOf(Elephant, Mammal)==true Define that: isSubClassOf(Mammal, Animal)==true isSubClassOf(Elephant,Animal)==true Independent of implementation and applyable to abritrary vocabularies: isSubClassOf(A, B) isSubClassOf(B, C) isSubClassOf(A,C)==true 29 WS 08/09 Wissenstechnologie @
  • 30. Semantics & Ontologies Semantics & Communication Example „Rules Similar „Rules“ exist in natural language Fact 1: „An elephant is a mammal“ „Mammals like for example elephants“ Fact 2: „A mammal is an animal“ Based on our formal knowledge we conclude that an g „elephant is an animal“. Note: Exploitable in Ontology Learning from Text 30 WS 08/09 Wissenstechnologie @
  • 31. Semantics & Ontologies Ontology Spectrum (McGuinness) ..or how much semantic expresses Thesauri “narrower Formal Frames Selected t term”” i is-a (properties) Logical Catalog/ relation Constraints ID (disjointness, inverse, …) Informal Formal General Terms/ is-a instance Value Logical glossary Restrs. constraints Originally from AAAI 1999- Ontologies Panel by Gruninger, Lehmann, McGuinness, Uschold, Welty; – updated by McGuinness. 31 Description in: WS 08/09 Wissenstechnologie @
  • 32. RDF Schema (RDFS) Semantic Web Stack RDF Schema 32 WS 08/09 Wissenstechnologie @
  • 33. RDF Schema (RDFS) RDF Schema (RDFS) http://www w3 org/2000/01/rdf-schema# Allows to express terminological knowledge over RDF Application of RDFS Defines a new vocabulary for giving meaning independent of program logic Allows to define „lightweight“ Ontologies and basic g g g Reasoning capabilities 33 WS 08/09 Wissenstechnologie @
  • 34. RDF Schema (RDFS) RDF Schema & Object-Orientierted Languages j p RDFS uses object-oriented Concepts: Classes Properties of the classes But not classes have properties (e.g. Java) Properties are assigned to classes: Easier to extend vocabulary Easier to assign properties to classes Take care on uniqueness of Properties q p 34 WS 08/09 Wissenstechnologie @
  • 35. RDF Schema (RDFS) RDF Schema Notation < schema#>. @prefix rdfs <http://www w3 org/2000/01/rdf-schema#> @prefix rdf <>. For the following slides we define this namespace 35 WS 08/09 Wissenstechnologie @
  • 36. RDF Schema (RDFS) RDF Schema Classes rdfs:Resource Class of all resources rdfs:Literal Class of literals (Strings) rdf:XMLLiteral Class of XML Literals rdfs:Class Class of classes rdf:Property Class of properties rdfs:Datatype Class of datatypes (e g integer etc.) (e.g. etc ) rdf:Statement Class of RDF Statements rdfs:Container Class of containers 36 WS 08/09 Wissenstechnologie @
  • 37. RDF Schema (RDFS) RDF Schema Properties rdf:type Subject is an instance of a class rdfs:subClassOf Subject is a subclass of a class rdfs:subPropertyOf Subject is a sub property of a property rdfs:domain A possible class for a subject of a property rdfs:range A possible class for an object of a property rdfs:label human readable label of an resource rdfs:comment human readable comment of an resource … 37 WS 08/09 Wissenstechnologie @
  • 38. RDF Schema (RDFS) RDF Schema Instances, Instances Classes Typing: Individuals are assigned to classes (multiple assignments possible) rdfs:Class rdf:type #MyBMW #Car rdf:type rdfs:subClassOf rdfs:Resource Note: Sometimes it is domain dependent what an instance is and what not (modelling aspect) 38 WS 08/09 Wissenstechnologie @
  • 39. RDF Schema (RDFS) RDF Schema Hierarchies rdf:subClassOf allows to define hierarchies among classes #Means of #Electric vehicle Transportation rdfs:subClassOf #MyBMW #Car #Train rdf:type #BMW rdfs:subClassOf 39 WS 08/09 Wissenstechnologie @
  • 40. RDF Schema (RDFS) RDF Schema Hierarchies Rdf:subPropertyOf allows to define hierarchies among properties ex:has – ex: hasFour – ex:hasTwo <#BMW> <#BMW> ex:hasFour <#Tires> . ex:has <#Tires> . 40 WS 08/09 Wissenstechnologie @
  • 41. RDF Schema (RDFS) RDF Schema Domain & Range rdf:Domain and rdf:Range allow to specify which classes of subjects (==domain) and which classes of object ( bj t (==range) a property can connect ) t t <ex:has> rdf:domain <#Car> <ex:has>rdf:Range <rdf:Resource> 41 WS 08/09 Wissenstechnologie @
  • 42. RDF Schema Example 42 WS 08/09 Wissenstechnologie @
  • 43. RDFS Semantics RDFS Semantics Model theoretic Model-theoretic semantics (subfield of formal semantics) Entailment: Given a graph the graph is transformed according to the rules of RDFS Implicit knowledge (i.e. not explicitly modelled) #Means of #Means of Transportation Transportation rdfs:subClassOf rdf:type yp rdfs:subClassOf #MyBMW #Car #MyBMW #Car rdf:type rdfs:subClassOf rdf:type df rdfs:subClassOf df bCl Of #BMW #BMW 43 WS 08/09 Wissenstechnologie @
  • 44. RDFS Semantics RDFS Semantics Deductive Rules/Entailment The RDF Semantics Document defines a list of 44 Entailment Rules: s1 K sn if s1 K sn are valid statements, add statement s lid dd s “do that recursively until the graph does not change do change” “this can be done in polynomial time for a specific graph” We have means for how statements should be interpreted We W can express “meaning” of URI’s using RDFS “ i ” f URI’ i 44 WS 08/09 Wissenstechnologie @
  • 45. RDFS Semantics RDFS Semantics Entailment Example u, x, u x v …. URI‘s or Blank Nodes URI s u rdfs : subtype rdfs : Class. u rdfs : subClassOf rdfs : Re source. rdfs:subtype rdfs:Class #Car rdfs:subClassOf rdfs:Resource #Means of u rdfs : subClassOf v. v rdfs : subClassOf x. Transportation u rdfs : subClassOf x. rdfs:subClassOf #Car 45 rdfs:subClassOf #BMW WS 08/09 Wissenstechnologie @
  • 46. RDFS Semantics RDFS Semantics Drawback/Restriction of RDF Open world assumption: false statements must be specified Closed world assumption: if a statement is missing, it is p g, assumed to be false No negation in RDFS possible • ex:michael rdf:type ex:nonsmoker • ex:michael rdf:type ex:smoker Does not lead to a contradiction! No l N rules over individuals e.g. ex:Humans = All i di id l H ex:Women and All ex:Men 46 No Counting: “An Elephant has 4 legs” An legs WS 08/09 Wissenstechnologie @
  • 47. Summary Classes, Instances, Ontology = Classes Instances Properties and Relationships RDFS as terminological vocabulary over RDF g y RDF Schema (RDFS): First step in increasing semantics No negation and restricted logic capabilities 47 WS 08/09 Wissenstechnologie @
  • 48. Points you should take away from this lecture • What are Ontologies in Computer Science? • What adds RDFS to the semantic expressiveness of RDF • Wh i RDFS not enough? Why is t h? 48 WS 08/09 Wissenstechnologie @
  • 49. That‘s it for today… Thanks for your attention Questions/comments? i @ 49 WS 08/09 Wissenstechnologie @
  • 50. License This work is licensed under the Creative Commons Attribution 2.0 Austria License. To view a copy of this license, visit http://creativecommons org/licenses/by/2 0/at/ Contributors: Mathias Lux Peter Scheir Klaus Tochtermann Michael Granitzer 50 WS 08/09 Wissenstechnologie @