openhpi 5.6 - web ontology language (part 3)
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 II06: Web Ontology Language (Part 3)
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
06 Web Ontology Language - OWL (Part 3)Open HPI - Course: Semantic Web Technologies - Lecture 5: Knowledge Representations II
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
4
OWL – Relationships among Individuals
• via inference it can be entailed that „WRR012345“ is an „AlcoholicBeverage“
• Difference of Individuals via owl:differentFrom
:WegelerRheingauRiesling a :Wine ; :isMadeOf :Riesling ; :hasVintageYear 2007 ; owl:sameAs :WRR012345 .:Wine a owl:Class ; rdfs:subClassOf :AlcoholicBeverage .:AlcoholicBeverage a owl:Class.
:WRR012346 a :Wine ; owl:differentFrom :WRR012345 .
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
5
OWL – Relationships among Individuals
[] a owl:AllDifferent ; owl:distinctMembers (:WegelerRheingauRiesling :AltoAdigeChardonnay :ChateauxLafiteRothschild :MarquesDeRiscal) .
• OWL provides a shortcut to define several individuals to be different
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
6
OWL – Closed Classes (Nominals)
• This says that there are only two redwines available in the store.
:Wine a owl:Class ;:ChateauxLatourPauillac a :Wine .:ChateauxLafiteRothschild a :Wine .:RedwinesInStore a owl:Class ; owl:oneOf (:ChateauxLatourPauillac, :ChateauxLafiteRothschild) .
RedwinesInStore ⊑ {ChateauxLatourPauillac, ChateauxLafiteRothschild}
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
7 • logical AND (conjunction): owl:intersectionOf ⊓
• logical OR (disjunction): owl:unionOf ⊔
• logical negation: owl:complementOf ¬
•Logical constructors are applied to create complex class descriptions from atomic classes.
OWL – Logical Class Constructors
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
8
OWL – Logical Class Constructors
• The class “WinesInStore“ results from the intersection of all individuals of the classes “ThingsInStore“ and “Wine“
:Wine a owl:Class .
:ThingsInStore a owl:Class .:WinesInStore a owl:Class ; owl:intersectionOf (:Wine :ThingsInStore) .
WinesInStore ≣ ThingsInStore ⊓ Wine
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
9
OWL – Logical Class Constructors
• Dry, medium and sweet wines are also wines
:Wine a owl:Class ;
owl:equivalentClass [ owl:unionOf ( :DryWine :MediumWine :SweetWine )
] .
Wine ≣ DryWine ⊔ MediumWine ⊔ SweetWine
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
10
• semantically equivalent assertion:
:Wine a owl:Class ;
rdfs:subClassOf [ owl:complementOf :Pizza
] .
:Wine a owl:Class ;
owl:disjointWith :Pizza .
OWL – Logical Class Constructors
Wine ⊑ ¬Pizza
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
11
OWL – Property Restrictions
• are used to describe complex classes via properties
• restrictions on values:
• owl:hasValue! ! !
• owl:allValuesFrom• owl:someValuesFrom
• restrictions on cardinality:
• owl:cardinality• owl:minCardinality• owl:maxCardinality
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
12
OWL – Property Restrictions with Constants
• Class „HaraldsCourses“ is described via fixed value assignment (=constant) of the individual „Harald“ to the property „isManagedBy“
HaraldsCourses ⊑ isManagedBy.(Harald)
:HaraldsCourses a owl:Class ; rdfs:subClassOf
[ a owl:Restriction ; owl:onProperty :isManagedBy ; owl:hasValue :Harald ] .
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
12
OWL – Property Restrictions with Constants
• Class „HaraldsCourses“ is described via fixed value assignment (=constant) of the individual „Harald“ to the property „isManagedBy“
HaraldsCourses ⊑ isManagedBy.(Harald)
:HaraldsCourses a owl:Class ; rdfs:subClassOf
[ a owl:Restriction ; owl:onProperty :isManagedBy ; owl:hasValue :Harald ] .
:Person a owl:Class .:Course a owl:Class .
:Harald a :Person .:isManagedBy a owl:ObjectProperty ; rdfs:domain :Course ; rdfs:range :Person .
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
13• owl:allValuesFrom
fixes all instances of a specific class C as allowed range for a property P → (Universal Quantification) ∀P.C
Wine ⊑ ∀hasProducer.Winemaker
OWL – Property Restrictions
:Wine a owl:Class ; rdfs:subClassOf
[ a owl:Restriction ; owl:onProperty :hasProducer ; owl:allValuesFrom :Winemaker ] .
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
13• owl:allValuesFrom
fixes all instances of a specific class C as allowed range for a property P → (Universal Quantification) ∀P.C
Wine ⊑ ∀hasProducer.Winemaker
OWL – Property Restrictions
:Wine a owl:Class ; rdfs:subClassOf
[ a owl:Restriction ; owl:onProperty :hasProducer ; owl:allValuesFrom :Winemaker ] .
:Producer a owl:Class .:Product a owl:Class .:Winemaker owl:subClassOf :Producer .
:hasProducer a owl:ObjectProperty ; rdfs:domain :Product ; rdfs:range :Producer .
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
14
• owl:someValuesFromdescribes that there must exist an individual for property P and fixes its range to class C → (existential quantification) ∃P.C
WineLover ⊑ ∃likes.Wine
OWL – Property Restrictions
:WineLover a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty :likes ; owl:someValuesFrom :Wine ] .
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
14
• owl:someValuesFromdescribes that there must exist an individual for property P and fixes its range to class C → (existential quantification) ∃P.C
WineLover ⊑ ∃likes.Wine
OWL – Property Restrictions
:WineLover a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty :likes ; owl:someValuesFrom :Wine ] .
:WineLover a owl:Class .:Wine a owl:Class .
:likes a owl:ObjectProperty ;
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
15
OWL – Cardinality Restrictions
• owl:cardinality restricts to an exact number (for OWL Lite only 1/0)
• owl:minCardinality, owl:maxCardinality restricts to upper / lower bounds
Stringquartett ⊑ (=4)hasMembers
:Stringquartett a owl:Class ; rdfs:subClassOf
[ a owl:Restriction ; owl:onProperty :hasMembers ; owl:cardinality 4 ] .
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
15
OWL – Cardinality Restrictions
• owl:cardinality restricts to an exact number (for OWL Lite only 1/0)
• owl:minCardinality, owl:maxCardinality restricts to upper / lower bounds
Stringquartett ⊑ (=4)hasMembers
:Stringquartett a owl:Class ; rdfs:subClassOf
[ a owl:Restriction ; owl:onProperty :hasMembers ; owl:cardinality 4 ] .
:hasMembers a owl:DatatypeProperty ; rdfs:domain :Thing ; rdfs:range xsd:integer .
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
16
07 Web Ontology Language - OWL (Part 4)Open HPI - Course: Semantic Web Technologies - Lecture 5: Knowledge Representations II