openhpi 5.5 - web ontology language (part 2)

16
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 05: Web Ontology Language - OWL (Part 2)

Upload: harald-sack

Post on 16-Jan-2015

376 views

Category:

Documents


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: OpenHPI 5.5 - Web Ontology Language (Part 2)

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 II05: Web Ontology Language - OWL (Part 2)

Page 2: OpenHPI 5.5 - Web Ontology Language (Part 2)

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.5 - Web Ontology Language (Part 2)

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

3

05 Web Ontology Language - OWL (Part 2)Open HPI - Course: Semantic Web Technologies - Lecture 5: Knowledge Representations II

Page 4: OpenHPI 5.5 - Web Ontology Language (Part 2)

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

4

OWL – Classes, Properties and Individuals

• Ontology axioms consist of the following three building blocks:

• Classes

•comparable with classes in RDFS

• Individuals

•comparable with objects in RDFS

• Properties

•comparable with properties in RDFS

Page 5: OpenHPI 5.5 - Web Ontology Language (Part 2)

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

5

• there exist two predefined classes

• owl:Thing (class that contains all individuals)

• owl:Nothing (empty class)

• Definition of a class

:Wine a owl:Class .

OWL – Classes

Page 6: OpenHPI 5.5 - Web Ontology Language (Part 2)

• Definition of individuals via class membership

• Individuals can also be defined without direct class membership as named entity

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

6

:WegelerRheingauRiesling a :Wine .

OWL – Individuals

Wine(WegelerRheingauRiesling)

:HaraldSack a owl:NamedIndividual .

Page 7: OpenHPI 5.5 - Web Ontology Language (Part 2)

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

7

OWL – Properties

• there exist two variants:

• object properties

• datatype properties

• Object properties are defined like classes

• Domain and Range of object properties

:isMadeFrom a owl:ObjectProperty .

:isMadeOf a owl:ObjectProperty ; rdfs:domain :Wine ; rdfs:range :Grapes .

Page 8: OpenHPI 5.5 - Web Ontology Language (Part 2)

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

8

OWL – Object Properties

• Domain and Range of object properties

• in DL domain and range can be defined in the following way:

• Domain: ∃isMadeOf.⊤ ⊑ Wine

• Range: ⊤ ⊑ ∀isMadeOf.Grapes

:isMadeOf a owl:ObjectProperty ; rdfs:domain :Wine ; rdfs:range :Grapes .

Page 9: OpenHPI 5.5 - Web Ontology Language (Part 2)

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

9• Datatype properties have datatypes as range

• Domain and range of datatype properties

• Many XML datatypes can be used.

:hasVintageYear a owl:DatatypeProperty .

OWL – Datatype Properties

:hasVintageYear a owl:DatatypeProperty ; rdfs:domain :Wine ; rdfs:range xsd:integer .

∃hasVintageYear.⊤ ⊑ Wine

⊤ ⊑ ∀hasVintageYear.Integer

Page 10: OpenHPI 5.5 - Web Ontology Language (Part 2)

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

10

OWL – Properties and Individuals

:Wine a owl:Class .:Grapes a owl:Class .:Riesling a :Grapes .:isMadeOf a owl:ObjectProperty ; rdfs:domain :Wine ; rdfs:range :Grapes .

:hasVintageYear a owl:DatatypeProperty ; rdfs:domain :Wine ; rdfs:range xsd:integer .

:hasQuality a owl:DatatypeProperty ; rdfs:domain :Wine ; rdfs:range xsd:string .:WegelerRheingauRiesling a :Wine ; :isMadeOf :Riesling ; :hasQuality “Spätlese“ .

Page 11: OpenHPI 5.5 - Web Ontology Language (Part 2)

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

11

OWL – Properties and Individuals

• Properties in general are not functional

:Tempranillo a :Grapes .:Garnacha a :Grapes .:Mazuelo a :Grapes .:Graciano a :Grapes .:MarquesDeRiscal a :Wine ; :isMadeOf :Tempranillo ; :isMadeOf :Garnacha ; :isMadeOf :Mazuelo ; :isMadeOf :Graciano .

Page 12: OpenHPI 5.5 - Web Ontology Language (Part 2)

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

12

OWL – Class Hierarchies

• via inference it can be entailed that „Wine“ is also a subclass of „Beverage“

:Wine a owl:Class ; rdfs:subClassOf :AlcoholicBeverage .:AlcoholicBeverage a owl:Class ; rdfs:subClassOf :Beverage .:Beverage a owl:Class .

Wine ⊑ AlcoholicBeverageAlcoholicBeverage ⊑ Beverage

Page 13: OpenHPI 5.5 - Web Ontology Language (Part 2)

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

13

OWL – Class Hierarchies and Disjunctiveness

• via inference it can be entailed that „Wine“ and „Pizza“ are also disjoint classes.

:AlcoholicBeverage a owl:Class .:MainDish a owl:Class .:Wine a owl:Class ; rdfs:subClassOf :AlcoholicBeverage .:Pizza a owl:Class ; rdfs:subClassOf :MainDish .

:AlcoholicBeverage owl:disjointWith :MainDish .

Wine ⊑ AlcoholicBeveragePizza ⊑ MainDishAlcoholicBeverage ⊓ MainDish ⊑ ⊥

Page 14: OpenHPI 5.5 - Web Ontology Language (Part 2)

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

14

OWL – Class Hierarchies and Disjunctiveness

• OWL provides a shortcut to define several classes to be disjunctive

[] a owl:AllDisjointClasses ; owl:members ( :Wine :Beer :SoftDrink :Vegetables :Seafood :Meat ) .

Page 15: OpenHPI 5.5 - Web Ontology Language (Part 2)

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

15

OWL – Class Hierarchies and Equivalence

:AlcoholicBeverage a owl:Class .:Liquor a owl:Class .:Wine a owl:Class ; rdfs:subClassOf :AlcoholicBeverage .:AlcoholicBeverage owl:equivalentClass :Liquor .

• via inference it can be entailed that „Wine“ is also an „Liquor“

Wine ⊑ AlcoholicBeverageAlcoholicBeverage ≡ Liquor

Page 16: OpenHPI 5.5 - Web Ontology Language (Part 2)

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

16

06 Web Ontology Language - OWL (Part 3)Open HPI - Course: Semantic Web Technologies - Lecture 5: Knowledge Representations II