Wissenstechnologie Iii 08 09

  • 843 views
Uploaded on

RDFS, Ontologies and Semantics

RDFS, Ontologies and Semantics

More in: Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
843
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
7
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Wissenstechnologie WS 08/09 Michael Granitzer IWM TU Graz & Know-Center Know Center http://kmi tugraz at http://kmi.tugraz.at http://www.know-center.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 http://creativecommons.org/licenses/by/2.0/at/.
  • 2. Today The Semantic Web h b Stack (rep ) (rep.) Semantics & Ontologies RDF S h Schema (RDFS) 2 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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] http://www.sciam.com/print_version.cfm?articleID=00048144- 10D2 1C70 84A9809EC588EF21 10D2-1C70-84A9809EC588EF21 3 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 6. The Semantic Web Stack (rep.) Semantic Web Stack a.k.a. SW Layer Cake y a.k.a. SW Tower 6 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 7. The Semantic Web Stack (rep.) Semantic Web Stack Unicode URI 7 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 8. The Semantic Web Stack (rep.) Semantic Web Stack XML XML Schema Namespaces 8 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 9. The Semantic Web Stack (rep.) Drawbacks of XML 9 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 11. The Semantic Web Stack (rep.) Semantic Web Stack RDF 11 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 13. The Semantic Web Stack (rep.) RDF Statements (Triples) A small example http://en.wikipedia.org/wiki/John_Lennon htt // iki di / iki/J h L http://dbpedia.org/property/associatedActs http://dbpedia org/property/associatedActs http://en.wikipedia.org/wiki/The_Beatles http://en.wikipedia.org/wiki/Paul_McCartney http://dbpedia.org/property/associatedActs rdfs:label „Paul McCartney“ Subject j Predicate Object j http://en.wikipedia.org/wiki/J http://dbpedia.org/property/a http://en.wikipedia.org/wiki/T ohn_Lennon ssociatedActs he_Beatles http://en.wikipedia.org/wiki/P http://dbpedia.org/property/a http://en.wikipedia.org/wiki/T aul_McCartney ssociatedActs he_Beatles http://en.wikipedia.org/wiki/P Rdfs:label “Paul McCartney” 13 aul_McCartney http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 14. The Semantic Web RDF – Serialisation Stack (rep.) Turtle Example - Extended # Define some namespaces @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix ex: <http://example org/terms/> . <http://example.org/terms/> <http://www.example.org/index.html> dc:creator <http://www.example.org/staffid/85740> . # write all statements in short form <http://www.example.org/staffid/85740> ex:name quot;John Smithquot;; ex:age quot;27quot; . 14 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 19. Semantics & Ontologies Ontologies & Semantics Example: Mammal Intension •isA(Vertebrate Animal) •has(Sweat glands) •withFunction(Milk) •withFunction(hair) •.... Extension •Elephant •Lion •Monkey Monkey •.... 19 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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. http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://ontolog.cim3.net/file/work/OntologySummit2007/workshop/McGuinness_NIST-interop-ontology-summit_20070423.ppt Originally from AAAI 1999- Ontologies Panel by Gruninger, Lehmann, McGuinness, Uschold, Welty; – updated by McGuinness. 31 Description in: www.ksl.stanford.edu/people/dlm/papers/ontologies-come-of-age-abstract.html http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 32. RDF Schema (RDFS) Semantic Web Stack RDF Schema 32 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 33. RDF Schema (RDFS) RDF Schema (RDFS) http://www.w3.org/2000/01/rdf-schema# 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 http://www.w3.org/TR/rdf-schema/ 33 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 35. RDF Schema (RDFS) RDF Schema Notation <http://www.w3.org/2000/01/rdf schema#>. @prefix rdfs <http://www w3 org/2000/01/rdf-schema#> @prefix rdf <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. For the following slides we define this namespace 35 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 42. RDF Schema Example 42 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://www.w3.org/TR/rdf-mt/ 44 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 49. That‘s it for today… Thanks for your attention Questions/comments? mgranitzer@tugraz.at i @ 49 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at
  • 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/ http://creativecommons.org/licenses/by/2.0/at/. Contributors: Mathias Lux Peter Scheir Klaus Tochtermann Michael Granitzer 50 http://kmi.tugraz.at WS 08/09 Wissenstechnologie @ kmi.tugraz.at