openhpi 5.6 - web ontology language (part 3)

20
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 II 06: Web Ontology Language (Part 3)

Upload: harald-sack

Post on 16-Jan-2015

300 views

Category:

Documents


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: OpenHPI 5.6 - Web Ontology Language (Part 3)

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)

Page 2: OpenHPI 5.6 - 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

Page 3: OpenHPI 5.6 - Web Ontology Language (Part 3)

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

Page 4: OpenHPI 5.6 - Web Ontology Language (Part 3)

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 .

Page 5: OpenHPI 5.6 - Web Ontology Language (Part 3)

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

Page 6: OpenHPI 5.6 - Web Ontology Language (Part 3)

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}

Page 7: OpenHPI 5.6 - Web Ontology Language (Part 3)

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

Page 8: OpenHPI 5.6 - Web Ontology Language (Part 3)

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

Page 9: OpenHPI 5.6 - Web Ontology Language (Part 3)

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

Page 10: OpenHPI 5.6 - Web Ontology Language (Part 3)

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

Page 11: OpenHPI 5.6 - Web Ontology Language (Part 3)

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

Page 12: OpenHPI 5.6 - Web Ontology Language (Part 3)

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 ] .

Page 13: OpenHPI 5.6 - Web Ontology Language (Part 3)

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 .

Page 14: OpenHPI 5.6 - Web Ontology Language (Part 3)

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 ] .

Page 15: OpenHPI 5.6 - Web Ontology Language (Part 3)

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 .

Page 16: OpenHPI 5.6 - Web Ontology Language (Part 3)

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 ] .

Page 17: OpenHPI 5.6 - Web Ontology Language (Part 3)

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 ;

Page 18: OpenHPI 5.6 - Web Ontology Language (Part 3)

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 ] .

Page 19: OpenHPI 5.6 - Web Ontology Language (Part 3)

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 .

Page 20: OpenHPI 5.6 - Web Ontology Language (Part 3)

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