(10) Semantic Web Technologies - OWL 2

2,513 views

Published on

Published in: Education
  • Be the first to comment

  • Be the first to like this

(10) Semantic Web Technologies - OWL 2

  1. 1. Semantic Web Technologies Lecture Dr. Harald Sack Hasso-Plattner-Institut für IT Systems Engineering University of Potsdam Winter Semester 2012/13 Lecture Blog: http://semweb2013.blogspot.com/ This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)Dienstag, 18. Dezember 12
  2. 2. Semantic Web Technologies Content2 1. Introduction 2. Semantic Web - Basic Architecture Languages of the Semantic Web - Part 1 3. Knowledge Representation and Logics Languages of the Semantic Web - Part 2 4. Applications in the ,Web of Data‘ Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  3. 3. last lect ure3 g e u a W LL ang O g y ol o n t b O W e Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  4. 4. OWL24 OWL SHROIQ(D) SHOIN(D) Extension Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  5. 5. Semantic Web Technologies Content5 3. Knowledge Representation and Logics The Languages of the Semantic Web - Part 2 • Excursion: Ontologies in Philosophy and Computer Science • Recapitulation: Propositional Logic and First Order Logic • Description Logics • RDF(S) Semantics • OWL and OWL-Semantics • OWL 2 • Rules Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  6. 6. OWL 26 OWL SHROIQ(D) SHOIN(D) Extension Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  7. 7. 3. Knowledge Representation & Logic 3.6 OWL 27 3.6 OWL 2 3.6.1 Development of OWL 2 3.6.2 From SHOIN(D) to SHROIQ(D) 3.6.3 OWL 2 Syntax 3.6.4 Complexity and other Properties 3.6.5 OWL 2 Profiles Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  8. 8. OWL – Web Ontology Language8 • OWL is a semantic fragment of FOL • OWL exists in different flavors • OWL Lite ⊆ OWL DL ⊆ OWL Full OWL1 FOL OWL1 SWRL/RIF OWL Full OWL DL OWL EL OWL Lite RDFS OWL RL OWL QL Concept Hierarchies Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  9. 9. OWL – Web Ontology Language9 • OWL is a semantic fragment of FOL • OWL exists in different flavors • OWL Lite ⊆ OWL DL ⊆ OWL Full • for OWL2: FOL • OWL EL, OWL RL, OWL QL OWL2 ⊆ OWL DL ⊆ OWL Full SWRL/RIF OWL Full OWL DL OWL2 OWL EL OWL Lite RDFS OWL RL OWL QL Concept Hierarchies Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  10. 10. OWL2 – Web Ontology Language 210 • DAML (DARPA Agent Markup Language, 1999) • RDF based markup language for knowledge representation (http://www.daml.org/) • DAML+OIL (Ontology Inference Layer, 2002) • Embedded infrastructure for Semantic Web applications • Based on description logics and frame logic • OWL 1 - W3C Recommendation since 2004 • OWL 2 (previously called OWL 1.1) • W3C Recommendation since 2009 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  11. 11. OWL2 – Web Ontology Language 211 • What has changed since OWL1? • Extensions from best practices and experiences with OWL 1 • additional expressivity with new ontological axioms • Refinement of OWL language flavors • additional extensions • new syntax, comments, etc. • Compatibility as far as possible with the old standard • Maintaining decidability for OWL 2 DL • Solving problems of the OWL 1 standard Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  12. 12. 12 3.6 OWL 2 3.6.1 Development of OWL 2 3.6.2 From SHOIN(D) to SHROIQ(D) 3.6.3 OWL 2 Syntax 3.6.4 Complexity and other Properties 3.6.5 OWL 2 Profiles Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  13. 13. OWL 1 DL is based on SHOIN(D) • Axioms • TBox: Subclass relationships C ⊑ D13 • RBox: Subproperty relationships R ⊑ S (H), inverse properties R- (I), transitivity ⊑+ (S) • ABox: Facts for classes C(a), properties R(a,b), equality a=b, difference a≠b • Class constructors: • conjunction C ⊓ D, disjunction C ⊔ D, Negation ¬C of classes • property restrictions: universal ∀R.C and existential ∃R.C • number restrictions: ≤n R und ≥n R (N) • enumerated classes: {a} (O) • Datatypes (D) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  14. 14. From SHOIN(D) zu SHROIQ(D) • SHOIN(D) supports various ABox facts:14 • class membership C(a) (C is complex class) • Exception: negated class membership ¬C(a) (C is complex class) • equality a=b • difference a≠b • property relation R(a,b) • negated property relation....? Extension from SHOIN(D) to SHROIQ(D) SHROIQ(D) allows negated properties in the ABox: ¬R(a,b) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  15. 15. From SHOIN(D) zu SHROIQ(D) Number Restrictions15 • SHOIN(D) supports simple number restrictions (N): • Person ⊓ ≥3hasChild • Class of all persons with at least 3 children • SHROIQ(D) also supports qualified number restrictions (Q): • Person ⊓ ≥3hasChild.(Woman⊓Professor) • Class of all persons with at least 3 daughters, who are professors Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  16. 16. From SHOIN(D) zu SHROIQ(D) The Self Concept16 • Try to model this: „Every Human knows himself.“ • SHOIN(D) • knows(Harald, Harald) knows(Magnus, Magnus) ... • General modeling in TBox not possible • SHROIQ(D) has a special element: Self • Human ⊑ ∃knows.Self Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  17. 17. From SHOIN(D) zu SHROIQ(D)17 Property Axioms • In SHOIN(D) properties can be modeled as • transitive, symmetric, functional and invers functional • SHROIQ(D) offers additional property axioms: • Antisymmetry: ∀a,b∈ΔI:(a,b)∈RI"(b,a)∉RI • Reflexivity: ∀a∈ΔI:(a,a)∈RI • Irreflexivity: ∀a∈ΔI:(a,a)∉RI • Disjunctiveness: ∀a,b∈ΔI:(a,b)∉RI∩SI Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  18. 18. From SHOIN(D) zu SHROIQ(D)18 Property Axioms • Additionaly for SHROIQ(D) an universal property U has been introduced: • ∀a,b∈ΔI: (a,b)∈UI, UI=∆Ix∆I • U was introduced to be the counterpart of the universal class ⊤ Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  19. 19. From SHOIN(D) zu SHROIQ(D)19 General Property Inclusion • „The friends of my friends are also my friends.“ • can be expressed as SHOIN(D) transitive property • But: „The foes of my friends are also my foes.“ • cannot be expressed as SHOIN(D) • In FOL as Rule: • ∀x,y,z:hasFriend(x,y)∧hasFoe(y,z)"hasFriendsFoe(x,z) • hasFriend º hasFoe ⊑ hasFriendsFoe hasFriend hasFoe Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  20. 20. From SHOIN(D) zu SHROIQ(D) General Property Inclusion20 • „The friends of my friends are also my friends.“ • can be expressed as SHOIN(D) transitive property • But: „The foes of my friends are also my foes.“ • cannot be expressed as SHOIN(D) Property Inclusion • RBox expressions of the form R1ºR2ºR3º.....ºRn⊑S e.g.: hasFriend º hasFoe ⊑ hasFriendsFoe • Semantics: if (x0,x1)∈R1I,(x1,x2)∈R2I...(xn-1,xn)∈RnI , then it also holds that (x0,xn)∈SI E.g.: (x0,x1)∈hasFriendI and (x1,x2)∈hasFoeI, then it also holds (x0,x2)∈hasFriendsFoeI Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  21. 21. From SHOIN(D) zu SHROIQ(D) Expressivity of Property Inclusion21 • With RBoxes formal Languages can be defined Example •Grammar for the (context free) language of the words ab, aabb, aaabbb, ... L ::= ab Ra º Rb ⊑ L gets L ::= aLb Ra º L º Rb ⊑ L •∃L.⊤ ≢ ⊥ („ ∃L.⊤ necessarely non-empty“) means: „There exists a chain Ra and Rb pertaining to the language.“ •∃L1.∃L2- ≢ ⊥ for two languages L1 and L2 means: „There exists a word pertaining to L1 and also to L2.“ But from formal languages is known: Emptiness of the intersection of context free languages is not decidable Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  22. 22. From SHOIN(D) zu SHROIQ(D) Expressivity of Property Inclusion22 • With RBoxes formal Languages can be defined Example •Grammar for the (context free) language of the words ab, aabb, aaabbb, ... L ::= ab Ra º Rb ⊑ L gets L ::= aLb Ra º L º Rb ⊑ L •∃L.⊤ ≢ ⊥ („ ∃L.⊤ necessarely non-empty“) means: „There exists a chain Ra and Rb pertaining to the language.“ •∃L1.∃L2- ≢ ⊥ for two languages L1 and L2 means: „There exists a word pertaining to L1 and also to L2.“ OWL with general propertry inclusion in UNDECIDABLE ! Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  23. 23. From SHOIN(D) zu SHROIQ(D) Regular RBoxes23 • Can property inclusion restricted in some way to stay decidable? • Rboxes are like grammars for context-free languages • Intersection of context free languages is problematic • Therefore restriction to regular languages! Regular RBoxes • Property names are ordered with ≺ (strict partial Ordering). • Each RBox Inclusion must must be formed like: •R º R ⊑ R •R º S1 º S2 º S3 º...º Sn ⊑ R •R- ⊑ R •S1 º S2 º S3 º... º Sn º R ⊑ R •S1 º S2 º S3 º ... º Sn ⊑ R • Where: Si ≺ R for all i=1,2,...,n • An RBox is called regular, if such an (strict) Ordering ≺ exists. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  24. 24. From SHOIN(D) zu SHROIQ(D) Regular RBoxes - Examples24 • Example: R º S ⊑ R S º S ⊑ S R º S º R ⊑ T is regular with ordering S ≺ R ≺ T • Example: R º T º S ⊑ T is not regular (not allowed inclusion) • Example: R º S ⊑ S S º R ⊑ R is not regular (no valid ordering possible) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  25. 25. From SHOIN(D) zu SHROIQ(D) Regular RBoxes - Examples25 • Example: hasParent º hasHusband ⊑ hasFather hasFather ⊑ hasParent • is not regular because regularity would enforce both hasParent ≺ hasFather and hasFather ≺ hasParent which is impossible because ≺ must be strict Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  26. 26. From SHOIN(D) zu SHROIQ(D) Restrictions for simple Properties26 • Simple properties in SHOIN(D) are properties without transitive subproperties • In SHROIQ(D) property inclusion has to be considered Simple Properties • are all properties that • are not on the right side of a property inclusion, • are the inverse of other simple properties, • are only on the right side of property inclusions R ⊑ S, where on the left side is a simple property •Non-simple properties are properties that are directly (or indirectly) dependent of property chains (º ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  27. 27. From SHOIN(D) zu SHROIQ(D) Rectricions for Simple Properties27 • The following expressions are permitted ONLY for simple properties: • ≤n R.C and ≥n R.C (qualified number restriction) • Irreflexive properties • Disjunctive properties •∃R.Self •¬R(a,b) •Reason: Saving Decidability Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  28. 28. From SHOIN(D) zu SHROIQ(D) Summary28 • To ensure decidability the following structural restrictions must hold or SHROIQ(D): • Regularity: Restriction of potential interaction of RBox axioms • Simplicity of properties: Restrictions of how to apply properties in number restrictions • Therefore a number of restrictions arise for the overall structure of the knowledge base that have to be considered for all axioms. • Attention: The union of several SHROIQ(D) knowledge bases might violate these restrictions, although each underlying knowledge base does comply to the restrictions! Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  29. 29. SHROIQ(D) Overview29 Class Expressions Tbox (Class axioms) • Class names A,B • Inclusion C ⊑ D • Conjunction C ⊓ D • Equivalence C ≣ D • Disjunction C ⊔ D • Negation ¬C Rbox (Property Axioms) • Exist. property restriction ∃R.C • Inclusion R1 ⊑ R2 • Univ property restriction ∀R.C • General Inclusion R(-)1 º R (-) 2 º ..... º R (-) n ⊑ R • Self ∃S.Self • Transitivity • Greater-than ≥n S.C • Symmetry • Less-than ≤ S • Reflexivity • Enumerated classes {a} • Irreflexivity • Disjunctiveness Properties • Property names R,S,T Abox (Facts) • Simple properties S,T • Class membership C(a) • Inverse properties R- • Property relation R(a,b) • Universal property U • Negated property relation ¬S(a,b) • Equality a=b • Inequality a≠b Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  30. 30. 30 3.6 OWL 2 3.6.1 Development of OWL 2 3.6.2 From SHOIN(D) to SHROIQ(D) 3.6.3 OWL 2 Syntax 3.6.4 Complexity and other Properties 3.6.5 OWL 2 Profiles Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  31. 31. OWL 2 Syntax Variants • OWL 2 can be represented in different Syntax variants31 • Functional Syntax: substitutes abstract Syntax of OWL 1 • RDF-Syntax: extension of existing OWL/RDF • XML-Syntax: Independent XML Serialisation • Manchester-Syntax: machine readable Syntax, esp. for ontology editors • Turtle: optional • Functional Syntax is easy to define, no RDF restrictions, more compact • RDF-Syntax important for compatibility issues • Turtle: simple and efficient to write... Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  32. 32. OWL 2 - Functional Syntax SubClassOf(  :Teenager DataSomeValuesFrom( :hasAge32 DatatypeRestriction( xsd:integer xsd:minExclusive "12"^^xsd:integer xsd:maxInclusive "19"^^xsd:integer ) ) ) SubClassOf( :Woman :Person ) SubClassOf( :Mother :Woman ) ... SubObjectPropertyOf( :hasWife :hasSpouse ) SymmetricObjectProperty( :hasSpouse ) AsymmetricObjectProperty( :hasChild ) ... Declaration( NamedIndividual( :John ) ) Declaration( NamedIndividual( :Mary ) ) Declaration( NamedIndividual( :Jim ) ) ... ClassAssertion( :Person :Mary ) ClassAssertion( :Woman :Mary ) ... ObjectPropertyAssertion( :hasWife :John :Mary ) NegativeObjectPropertyAssertion( :hasWife :Bill :Mary ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  33. 33. OWL 2 - Manchester Syntax Class: Person Annotations: ...33 SubClassOf: owl:Thing that hasFirstName exactly 1 and hasFirstName only string[minLength 1] ,... SubClassOf: hasAge exactly 1 and hasAge only not NegInt,... SubClassOf: hasGender exactly 1 and hasGender only {female , male} ,... SubClassOf: not hates Self, ... EquivalentTo: g:People ,... DisjointWith: g:Rock , g:Mineral ,... ObjectProperty: hasWife Annotations: ... Characteristics: Functional, InverseFunctional, Reflexive, Irreflexive, Asymmetric, Transitive Domain: Man Range: Person, Woman SubPropertyOf: hasSpouse, loves EquivalentTo: isMarriedTo ,... DisjointWith: hates ,... InverseOf: hasSpouse Individual: John Annotations: ... Types: Person , hasFirstName value "John" or hasFirstName value "Jack"^^xsd:string Facts: hasWife Mary, not hasChild Susan, hasAge 33, hasChild _:child1 SameAs: Jack ,... DifferentFrom: Susan ,... Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  34. 34. OWL 2 - Turtle Syntax34 :HappyPerson a owl:Class ; owl:equivalentClass [ a owl:Class ; owl:intersectionOf ([ a owl:Restriction ; owl:onProperty :hasChild ; owl:allValuesFrom :HappyPerson ] [ a owl:Restriction ; owl:onProperty :hasChild ; owl:someValuesFrom :HappyPerson ] ) ]. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  35. 35. OWL 2 Syntax Variants • OWL 2 can be represented in different Syntax variants35 • Functional Syntax: substitutes abstract Syntax of OWL 1 • RDF-Syntax: extension of existing OWL/RDF • XML-Syntax: Independent XML Serialisation • Manchester-Syntax: machine readable Syntax, esp. for ontology editors • Turtle: optional • Functional Syntax is easy to define, no RDF restrictions, more compct • RDF-Syntax important for compatibility issues • Turtle: simple and efficient to write... Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  36. 36. OWL 2 Individual Definition36 • In OWL 2 Individuals can be defined as named entity also without direct class membership :HaraldSack a owl:NamedIndividual . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  37. 37. OWL 2 Disjunctive Classes37 • In OWL 1 two classes can be defined to be disjunctive (owl:disjointWith) • OWL 2 offers a shortcut for defining several classes to be disjunctive [] a owl:AllDisjointClasses ; owl:members ( :KindergartenKinder :Schueler :Studenten :Professoren ) . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  38. 38. OWL 2 Disjunctive Classes • In OWL 1 a class can be defined to be the union of two38 classes via owl:unionOf • OWL 2 offers the possibility of defining a class as disjunctive union of classes, i.e. C⊑D⊔E with D⊓E=⊥ :MusicInstruments a owl:class; rdfs:subClassOf [ owl:disjointUnionOf ( :StringInstrument :PercussionInstrument :PuckedInstrument :KeyboardInstrument ) ] . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  39. 39. OWL 2 Properties and Relations39 • In OWL 1 properties can be defined as transitive, symmetric, functional and inverse functional • OWL 2 offers in addition • Asymmetric properties via owl:AsymmetricProperty • Reflexive properties via owl:ReflexiveProperty • Irreflexive properties via owl:IrreflexiveProperty Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  40. 40. OWL 2 Properties and Relations • In addition OWL 2 offers to model assertions of the following40 kind: All students of the HPI with the same name and the same birth date are the same students.“ • In General: In OWLs for a Class there can be defined a set of properties, that identify individuals of that class in the same way as a key :HPIStudents rdf:type owl:Class ; owl:hasKey (:hasName :hasBirthDate ) . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  41. 41. OWL 2 Properties and Relations • In addition OWL 2 offers to model assertions of the following41 kind: All students of the HPI with the same name and the same birth date are the same students.“ • In General: In OWLs for a Class there can be defined a set of properties, that identify individuals of that class in the same way as a key Attention: • Keys must only be applied to named Individuals • Keys is not an element of description logics Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  42. 42. OWL 2 Properties and Relations • OWL 2 offers the Definition of disjunctive properties42 • Two properties R and S are disjunctive, if two individuals x,y are never related via both properties :hasParent a owl:ObjectProperty ; owl:propertyDisjointWith :hasChild . • Shortcut for several disjunctive properties [] rdf:type owl:AllDisjointProperties owl:members ( :hasParent :hasChild :hasGrandchild ) . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  43. 43. OWL 2 Properties and Relations • OWL 2 defines a universal and empty property as43 counterparts for top and bottom classes: • owl:topObjectProperty relates each potential pair of individuals, superclass for object properties • owl:bottomObjectProperty connects no individuals, subclass of all object properties • owl:topDatatypeProperty relates all individuals with all typed literals, superclass for all datatye properties • owl:bottomDatatypeProperty connects no individual and no typed literal, subclass of all datatype properties Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  44. 44. OWL 2 Properties and Relations44 • OWL 2 enables the definition of inverse properties :hasExaminer a owl:ObjectProperty ; rdfs:subPropertyOf [ a owl:ObjectProperty ; owl:inverseOf :participatesAt ] . • Not allowed for datatype properties Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  45. 45. OWL 2 General Property Inclusion45 • OWL 2 enables property chaining :hasFriendsFoe a owl:ObjectProperty ; owl:PropertyChainAxiom ( :hasFriend :hasFoe ) . • Not allowed for datatype properties hasFriend hasFoe Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  46. 46. OWL 2 Qualified Number Restriction • OWL 2 enables class constructors with number46 restrictions on properties connected with a range constraint • E.g.: Examination ⊑ ≥2 hasExaminer.Professor :Examination a owl:Class; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty :hasExaminer ; owl:minQualifiedCardinality “2“^^xsd:nonNegativeInteger; owl:onClass :Professor ] . • owl:maxQualifiedCardinality, owl:minQualifiedCardinality, owl:qualifiedCardinality Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  47. 47. OWL 2 Reflexive Property Restriction • OWL 2 enables the definition of classes that contain47 individuals that are related to themselves for specific properties :Philosoph a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty :knows ; owl:hasSelf “true“^^xsd:boolean ] . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  48. 48. OWL 2 Negated Property Instantiation • OWL 1 enables two individuals to be connected via an object48 property • OWL 2 also enables to express that two individuals are NOT related via a given property • E.g..: ¬isBrother(Max,Moritz) [] rdf:type owl:negativePropertyAssertion ; owl:sourceIndividual :Max ; owl:assertionProperty :isBrother ; owl:targetIndividual :Moritz . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  49. 49. OWL 2 Datatypes • OWL 2 supports most XML Schema Datatypes that have been49 supported by OWL 1 • Exception: xsd:time, xsd:date, xsd:gYear, xsd:gMonth, xsd:gDay, xsd:gMonthDay, xsd:gYearMonth • The following new Datatypes are available for OWL2: • owl:real, owl:rational, rdf:PlainLiteral, rdf:XMLLiteral, xsd:dateTimeStamp • Additional possibility to restrict the range of datatype properties: • Numbers: xsd:maxExclusive, xsd:minExclusive, xsd:maxInclusive, xsd:minInclusive • Strings: xsd:minLength, xsd:maxLength, xsd:length, xsd:pattern Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  50. 50. 50 3.6 OWL 2 3.6.1 Development of OWL 2 3.6.2 From SHOIN(D) to SHROIQ(D) 3.6.3 OWL 2 Syntax 3.6.4 Complexity and other Properties 3.6.5 OWL 2 Profiles Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  51. 51. How complex is SHROIQ(D)? • SHOIN(D) (OWL DL) is rather complex (NExpTime)51 • What about SHROIQ(D)? • Observation: some expressions are not mandatory • Transitive properties correspond to R º R ⊑ R • Symmetry corresponds to R- ⊑ R • Irreflexivity corresponds to ⊤ ⊑ ¬∃R.Self • Universal property corresponds to the following Axiom: ⊤ ⊑ ∃R.{a}, R º R- ⊑ U • ABox can be expressed via enumerated classes: e.g. R(a,b) corresponds to {a} ⊑ ∃R.{b} • Qualified number restriction is not problematic • Main Problem: Property axioms and general property inclusion Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  52. 52. How to Deal with Property Inclusion? • RBox-Axioms are similar to formal grammars52 • each property R defines a regular language: the languages of a property chain, which entails R • regular languages ≡ regular expressions ≡ finite automatons • Approach: Extend Tableaux algorithm with „RBox automaton“ Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  53. 53. Decidability of SHROIQ(D)?53 • Tableaux algorithm for SHROIQ(D) available: SHROIQ(D) is decidable. • Tableaux algorithm not well suited for estimating complexity • Complexity result (2008): SHROIQ(D) is N2ExpTime complete Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  54. 54. OWL 2 DL Meta Modeling Meta Modeling54 Specification of ontological knowledge about single ontology elements (including classes, properties, axioms). • Examples: • „The class Person was created on 3.1.2010 by Magnus.“ • „For the class City the property inhabitants is recommended.“ • „The assertion ‚Dresden was founded at 1206 AD‘ was determined by machine with a probability of 85%.“ • (Compare to reification in RDF) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  55. 55. „Wordplay“ in OWL 2: Punning • Meta modeling in expressive logics is dangerous and55 expensive... • OWL 2 only supports limited meta modeling Punning • Names for classes, properties, individuals do not have to be disjunctive (Exception: ObjectPropertys and DataPropertys) • no logical relation between class, individual and property of the same name • Relations only relevant for pragmatic interpretation • Example: • Person(Harald), classCreatedBy(Person, Magnus) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  56. 56. 3.6 OWL 2 3.6.1 Development of OWL 2 3.6.2 From SHOIN(D) to SHROIQ(D)56 3.6.3 OWL 2 Syntax 3.6.4 Complexity and other Properties 3.6.5 OWL 2 Profiles Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamVia http://lifeinbonetown.blogspot.com/2010_08_01_archive.html Dienstag, 18. Dezember 12
  57. 57. OWL 2 Profiles • OWL 2 Profiles are sub-languages of OWL 257 • OWL 2 DL corresponds to SHROIQ(D) • OWL 2 Full simply is an extension of OWL 1 Full • What about OWL 2 Lite? • OWL 1 Lite has nearly the same complexity as OWL 1 DL • Originally intended as part of OWL that is simple and efficient to implement • New approach for OWL 2: • Definition of several language profiles • languages should have efficient runtime complexity Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  58. 58. OWL 2 Profiles • Approach: • Identify maximal OWL 2 sub-languages (fragments)58 that are decidable in polynomial time • Main reason for super-polynomial runtime: Non-Determinism (requires guessing / backtracking) • Disjunction or Negation + Conjunction • Maximum number restrictions • Combination of existential and universal quantification in one superclass • Non-unary enumerated classes • therefore not allowed for OWL 2 Profiles • Attention: many other features may also lead to non- determinism... Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  59. 59. OWL Profiles • OWL 2 EL • OWL 2 EL Profile is based on the description logic EL++: • OWL 2 QL59 • OWL 2 RL Description Logic EL++ • Conjunction C⊓D, existential Restriction ∃R.C, ⊤ and ⊥ • Enumerated Classes, restricted property ranges • General property inclusion (RBox), Transitivity • NOT ALLOWED: Universal quantification, disjunction, complement, number restrictions, disjunctiveness und inverted properties ⊓∃⊤⊥ ⊑ ⊓∃⊤⊥ Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  60. 60. OWL Profiles • OWL 2 EL • OWL 2 QL • OWL 2 EL Profile is based on the description logic EL++:60 • OWL 2 RL Description Logic EL++ • Conjunction C⊓D, existential Restriction ∃R.C, ⊤ and ⊥ • Enumerated Classes, restricted property ranges • General property inclusion (RBox), Transitivity • NOT ALLOWED: Universal quantification, disjunction, complement, number restrictions, disjunctiveness und inverted properties • Advantages: • Polynomial complexity for standard entailment, i.e. decidability, class membership, etc. • simple implementation • supports important ontologies (e.g. SNOMED-CT) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  61. 61. OWL Profiles • OWL 2 EL • OWL 2 QL • OWL 2 EL Examples:61 • OWL 2 RL • ∃has.Sorrow ⊑ ∃has.Liqueur • ∃married.⊤ ⊓ CatholicPriest ⊑ ⊥ • German ⊑ ∃knows.{angela} • hasParent º hasParent ⊑ hasGrandparent Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  62. 62. OWL Profiles • OWL 2 QL Profile is based on description logic • OWL 2 EL DL Lite: • OWL 2 QL Description Logic DL Lite62 • OWL 2 RL • Superclasses (R⊑S): ⊓, ¬, ∃R.C • Subclasses (R⊑S): ∃R.⊤ • inverse properties, simple property hierarchies • ABox like SHROIQ(D) • NOT ALLOWED: Universal quantification, enumerated classes, disjunction, self, functional and inverse functional properties, number restrictions, transitivity, general property inclusion, equality of individuals • Example: • ∃married.⊤ ⊑ Lucky ⊓ ∃has.noSorrows Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  63. 63. OWL Profiles • OWL 2 QL Profile is based on description logic • OWL 2 EL DL Lite: • OWL 2 QL Description Logic DL Lite63 • OWL 2 RL • Superclasses (R⊑S): ⊓, ¬, ∃R.C • Subclasses (R⊑S): ∃R.⊤ • inverse properties, simple property hierarchies • ABox like SHROIQ(D) • NOT ALLOWED: Universal quantification, enumerated classes, disjunction, self, functional and inverse functional properties, number restrictions, transitivity, general property inclusion, equality of individuals • Advantages: • Sub-polynomial complexity (related to Relational Databases), Instance retrieval in LogSpace • fast implementations available, scalable Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  64. 64. OWL Profiles • OWL 2 EL • OWL 2 RL Profile is based on Horn-Rule fragment • OWL 2 QL of OWL2:64 • OWL 2 RL • Subclass axioms (R⊑S) can be interpreted as rules (R"S) Horn-Rule fragment of OWL 2: • Superclasses (R⊑S): ⊓, ∃R.{a},∀R.C, ≤1R.C • Subclasses (R⊑S): ⊓, ⊔, ∃R.C, ∃R.{a} • ⊤, ⊥ • NOT ALLOWED: negated facts, reflexivity, ... • Advantages: • Polynomial complexity (PTime-complete) • Simple Implementation (OWL Axioms as Rules) • Related to rule languages Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  65. 65. OWL Profiles • OWL 2 EL • OWL 2 RL Examples: • OWL 2 QL • ∃parentOf.∃parentOf.⊤ ⊑ Grandparent65 • OWL 2 RL (as rule: parentOf(x,y) ⋀ parentOf(y,z) → Grandparent(x) • Orphan ⊑ ∀hasParent.Dead (as rule: Orphan(x) ⋀ hasParent(x,y) → Dead(y) • Monogamous ⊑ ≤1 married.Alive (as rule: Monogamous(x) ⋀ married(x,y) ⋀ Alive(y) ⋀ married(x,z) ⋀ Alive(z) → y=z ) • childOf childOf ⊑ grandchildOf º (as rule: childOf(x,y) ⋀ childOf(y,z) → grandchildOf(x,z) ) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  66. 66. OWL 2 FULL • Extension of OWL 1 Full66 with new OWL 2 constructs, i.e. union of OWL 2 DL and RDFS • Serves as conceptional modeling language, but currently only low software support for automated reasoning • logical consistency of existing specification in not already clear (as of OWL 1 Full) • But: • Many OWL 1 Full ontologies can now be interpreted as OWL 2 DL ontology (cf. Punning) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  67. 67. OWL 2 Reasoner • OWL 2 DL:67 • Pellet: http://clarkparsia.com/pellet/ • HermiT: http://www.hermit-reasoner.com/ • OWL 2 EL: • CEL: http://code.google.com/p/cel/ • OWL 2 RL: • in principle all rule based reasoners • OWL 2 QL: • in principle all SQL databases (of course only with transcriptions...) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  68. 68. 3. Knowledge Representation & Logic 3.6 OWL 268 3.6 OWL 2 3.6.1 Development of OWL 2 3.6.2 From SHOIN(D) to SHROIQ(D) 3.6.3 OWL 2 Syntax 3.6.4 Complexity and other Properties 3.6.5 OWL 2 Profiles Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  69. 69. Semantic Web Technologies Content69 3. Knowledge Representation and Logics The Languages of the Semantic Web - Part 2 • Excursion: Ontologies in Philosophy and Computer Science • Recapitulation: Propositional Logic and First Order Logic • Description Logics • RDF(S) Semantics • OWL and OWL-Semantics • OWL 2 • Rules Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  70. 70. nex t le ctu re70 & c s ti l e u R ema n e S b t h W e Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  71. 71. 3. Knowledge Representation & Logic 3.6 OWL 271 Bibliography • P. Hitzler, S. Roschke, Y. Sure: Semantic Web Grundlagen, Springer, 2007. • P. Hitzler, M. Krötzsch, S. Rudolph: Foundations of Semantic Web Technologies, CRC Press, 2009. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12
  72. 72. 3. Knowledge Representation & Logic 3.6 OWL 272 □Blog http://semweb2013.blogspot.com/ □Webseite http://www.hpi.uni-potsdam.de/studium/ lehrangebot/itse/veranstaltung/ semantic_web_technologien-3.html □bibsonomy - Bookmarks http://www.bibsonomy.org/user/lysander07/ swt1213_10 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 18. Dezember 12

×