openhpi 5.4 - web ontology language
DESCRIPTION
TRANSCRIPT
This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
Dr. Harald Sack
Hasso Plattner Institute for IT Systems Engineering
University of Potsdam
Spring 2013
Semantic Web Technologies
Lecture 5: Knowledge Representations II04: Web Ontology Language - OWL
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
2
Lecture 5: Knowledge Representations II
Open HPI - Course: Semantic Web Technologies
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
3
04 Web Ontology Language - OWLOpen HPI - Course: Semantic Web Technologies - Lecture 5: Knowledge Representations II
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
4• OWL (SHOIN(D))- W3C Recommendation since 2004
• OWL 2 (SHROIQ(D))- W3C Recommendation since 2009
OWL – Web Ontology Language
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
4• OWL (SHOIN(D))- W3C Recommendation since 2004
• OWL 2 (SHROIQ(D))- W3C Recommendation since 2009
• OWL Ontology consists of
OWL – Web Ontology Language
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
4• OWL (SHOIN(D))- W3C Recommendation since 2004
• OWL 2 (SHROIQ(D))- W3C Recommendation since 2009
• OWL Ontology consists of
• Classes / properties / individuals (instances of classes)
OWL – Web Ontology Language
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
4• OWL (SHOIN(D))- W3C Recommendation since 2004
• OWL 2 (SHROIQ(D))- W3C Recommendation since 2009
• OWL Ontology consists of
• Classes / properties / individuals (instances of classes)
• Open World Assumption
OWL – Web Ontology Language
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
4• OWL (SHOIN(D))- W3C Recommendation since 2004
• OWL 2 (SHROIQ(D))- W3C Recommendation since 2009
• OWL Ontology consists of
• Classes / properties / individuals (instances of classes)
• Open World Assumption
• „Absence of information must not be valued as negative information.“
OWL – Web Ontology Language
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
4• OWL (SHOIN(D))- W3C Recommendation since 2004
• OWL 2 (SHROIQ(D))- W3C Recommendation since 2009
• OWL Ontology consists of
• Classes / properties / individuals (instances of classes)
• Open World Assumption
• „Absence of information must not be valued as negative information.“
• E.g.: sitsNextTo(PersonA, PersonB) PersonA may also sit next to another person…
OWL – Web Ontology Language
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
4• OWL (SHOIN(D))- W3C Recommendation since 2004
• OWL 2 (SHROIQ(D))- W3C Recommendation since 2009
• OWL Ontology consists of
• Classes / properties / individuals (instances of classes)
• Open World Assumption
• „Absence of information must not be valued as negative information.“
• E.g.: sitsNextTo(PersonA, PersonB) PersonA may also sit next to another person…
• No Unique Name Assumption
OWL – Web Ontology Language
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
4• OWL (SHOIN(D))- W3C Recommendation since 2004
• OWL 2 (SHROIQ(D))- W3C Recommendation since 2009
• OWL Ontology consists of
• Classes / properties / individuals (instances of classes)
• Open World Assumption
• „Absence of information must not be valued as negative information.“
• E.g.: sitsNextTo(PersonA, PersonB) PersonA may also sit next to another person…
• No Unique Name Assumption
• „Difference must be expressed explicitly“
OWL – Web Ontology Language
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
4• OWL (SHOIN(D))- W3C Recommendation since 2004
• OWL 2 (SHROIQ(D))- W3C Recommendation since 2009
• OWL Ontology consists of
• Classes / properties / individuals (instances of classes)
• Open World Assumption
• „Absence of information must not be valued as negative information.“
• E.g.: sitsNextTo(PersonA, PersonB) PersonA may also sit next to another person…
• No Unique Name Assumption
• „Difference must be expressed explicitly“
• E.g.: PersonA possibly denotes the same individual as PersonB
OWL – Web Ontology Language
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
5
OWL – Web Ontology Language
• OWL is a semantic fragment of FOL
• OWL exists in different flavors
FOL
SWRL/RIF OWL Full
OWL DL
OWL Lite RDFS
ConceptHierarchies
OWL ELOWL RLOWL QL
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
5
OWL – Web Ontology Language
• OWL is a semantic fragment of FOL
• OWL exists in different flavors
• OWL Lite ⊆ OWL DL ⊆ OWL Full
FOL
SWRL/RIF OWL Full
OWL DL
OWL Lite RDFS
ConceptHierarchies
OWL ELOWL RLOWL QL
OWL1
OWL1Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Turmbau zu Babel, Pieter Brueghel, 1563
5
OWL – Web Ontology Language
• OWL is a semantic fragment of FOL
• OWL exists in different flavors
• OWL Lite ⊆ OWL DL ⊆ OWL Full
FOL
SWRL/RIF OWL Full
OWL DL
OWL Lite RDFS
ConceptHierarchies
OWL ELOWL RLOWL QL
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
6
OWL – Web Ontology Language
• OWL is a semantic fragment of FOL
• OWL exists in different flavors
• OWL Lite ⊆ OWL DL ⊆ OWL Full
• for OWL2:FOL
SWRL/RIF OWL Full
OWL DL
OWL Lite RDFSOWL ELOWL RLOWL QL
OWL2
ConceptHierarchies
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
6
OWL – Web Ontology Language
• OWL is a semantic fragment of FOL
• OWL exists in different flavors
• OWL Lite ⊆ OWL DL ⊆ OWL Full
• for OWL2:
• OWL EL, OWL RL, OWL QL ⊆ OWL DL ⊆ OWL Full
FOL
SWRL/RIF OWL Full
OWL DL
OWL Lite RDFSOWL ELOWL RLOWL QL
OWL2
ConceptHierarchies
OWL2Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Turmbau zu Babel, Pieter Brueghel, 1563
6
OWL – Web Ontology Language
• OWL is a semantic fragment of FOL
• OWL exists in different flavors
• OWL Lite ⊆ OWL DL ⊆ OWL Full
• for OWL2:
• OWL EL, OWL RL, OWL QL ⊆ OWL DL ⊆ OWL Full
FOL
SWRL/RIF OWL Full
OWL DL
OWL Lite RDFSOWL ELOWL RLOWL QL
OWL2
ConceptHierarchies
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
7
OWL 1 DL is based on SHOIN(D)
• Axioms
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
7
OWL 1 DL is based on SHOIN(D)
• Axioms
• TBox: subclass relationships C ⊑ D
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
7
OWL 1 DL is based on SHOIN(D)
• Axioms
• TBox: subclass relationships C ⊑ D
• RBox: subproperty relationships R ⊑ S (H),
inverse properties R- (I), transitivity ⊑+ (S)
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
7
OWL 1 DL is based on SHOIN(D)
• Axioms
• TBox: subclass relationships C ⊑ D
• 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
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
7
OWL 1 DL is based on SHOIN(D)
• Axioms
• TBox: subclass relationships C ⊑ D
• 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:
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
7
OWL 1 DL is based on SHOIN(D)
• Axioms
• TBox: subclass relationships C ⊑ D
• 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
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
7
OWL 1 DL is based on SHOIN(D)
• Axioms
• TBox: subclass relationships C ⊑ D
• 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
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
7
OWL 1 DL is based on SHOIN(D)
• Axioms
• TBox: subclass relationships C ⊑ D
• 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 and ≥n R (N)
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
7
OWL 1 DL is based on SHOIN(D)
• Axioms
• TBox: subclass relationships C ⊑ D
• 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 and ≥n R (N)
• closed classes (nominals): {a} (O)
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
7
OWL 1 DL is based on SHOIN(D)
• Axioms
• TBox: subclass relationships C ⊑ D
• 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 and ≥n R (N)
• closed classes (nominals): {a} (O)
•Datatypes (D)
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
8
• OWL 2 can be represented in different Syntax variants
• 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...
OWL Syntax Variants
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
9
OWL 2 - Functional Syntax
SubClassOf( :Teenager DataSomeValuesFrom( :hasAge 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 Potsdam
10
OWL 2 - Manchester Syntax
Class: Person Annotations: ... 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 Potsdam
11
OWL 2 - Turtle Syntax
: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 Potsdam
12
Standard Namespaces and Prefixes
(cf. http://www.w3.org/TR/owl2-syntax/ )
http://prefix.cc/
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
13
05 Web Ontology Language - OWL (Part 2)Open HPI - Course: Semantic Web Technologies - Lecture 5: Knowledge Representations II