1 of 82

Introduction to Web Ontology Language (OWL)

Bangladesh Short-Term Course (Artificial Intelligence)

Plaban Kumar Bhowmick

Assistant Professor

Centre of Excellence in Artificial Intelligence

Indian Institute of Technology Kharagpur

2 of 82

3 of 82

Ontology is a formal Specification of a shared conceptualization of a domain of interest [Gruber 93]

Formal Specification

of

Conceptualization

Concepts

Domain of

Interest

of

Reasoning

+

Processable

Group of

shared

People

Web agents

Applications

Ontology

Services

4 of 82

What’s there in an ontology?

  • Concepts:
    • Classes + class-hierarchy

  • Properties:
    • often also called “Roles” or “Slots”

  • Axioms/Relations:
    • hasAncestor is a transitive property
    • A person can have at most one father or mother
      • Cardinality Restriction
    • Definition of Grandfather class

  • Reasoning tasks:
    • Classification: Does in individual belong to the Grandfather class?
    • Subsumption: Is a class subsumed by another class?
    • Consistency Checking: Whether the definitions/axioms are consistent or not.

Person

Man

Woman

Father

Grandfather

Daughter

Aunt

hasAncenstor

hasParent

isWifeof

hasWife

5 of 82

Ontology Language Requirements

  • Requirements
    • Well defined syntax
    • Well defined semantics
    • Efficient reasoning support
    • Sufficient expressive power
    • Convenience of expression

6 of 82

Formal Semantics and Reasoning

  • Class membership
    • If x is an instance of C and C is a subclass of D, then x is an instance of D

  • Equivalence of classes
    • If A is equivalent class of B and B is an equivalent class of C then A is equivalent to C

  • Consistency
    • x is an instance of class A and B. A and B are disjoint classes

7 of 82

Limitation of Expressive Power of RDF Schema

  • Local scope of properties
    • No localized domain or range restriction
    • In RDFS we cannot represent
      • Cows eat only plants while other animals eat meat too
  • Disjointness of classes
    • In RDFS we cannot represent
      • Male and Female classes are disjoint
  • Boolean combination of classes
    • In RDFS we cannot say
      • Person class is disjoint union of Male and Female class

8 of 82

Limitation of Expressive Power of RDF Schema

  • Cardinality restriction
    • In RDFS we cannot represent
      • A person has exactly two biological parents
  • Special characteristics of properties
    • In RDFS we cannot represent
      • A property may be transitive, symmetric
      • A property may be unique
      • A property is inverse of another property

9 of 82

Origins of OWL

DAML

DAML+OIL

OIL

OWL

RDF

10 of 82

Ontology in Layer Cake

11 of 82

OWL-RDFS Connection

  • Same triple-based data model

  • Extends RDFS vocabulary

  • OWL is more expressive by including more complex relations of classes and properties

SUBJECT

PREDICATE

OBJECT

Same Data Model

12 of 82

OWL-RDFS Connection

rdfs:Resource

rdfs:Class

rdf:Property

owl:Class

owl:ObjectProperty

owl:DatatypeProperty

13 of 82

Three Species of OWL

  • OWL Full
    • Uses all OWL primitives
    • Combines primitives with RDF and RDFS
    • Pros:
      • Very expressive
      • Fully compatible with RDF and RDFS
    • Cons:
      • Inference is undecidable without any guarantee on complete and efficient reasoning

14 of 82

Three Species of OWL

  • OWL DL
    • Uses a subset of OWL primitives
    • Restrictions on the RDF and RDFS primitives to be used
    • Pros:
      • Efficient reasoning support
    • Cons:
      • Loose full compatibility with RDF
      • Every RDF document is not an OWL document

15 of 82

Three Species of OWL

  • OWL Lite
    • More restricted and easy to use OWL constructs
    • Pros:
      • Efficient reasoning, easier to grasp and implement
    • Cons:
      • Restricted expressivity

Full

DL

Lite

16 of 82

The OWL Syntax

  • Class Elements
    • Classes are defined with owl:Class

<owl:Class rdf:ID="associateProfessor">

<rdfs:subClassOf rdf:resource="#academicStaffMember"/>

</owl:Class>

17 of 82

Class Elements

<owl:Class rdf:about="#associateProfessor">

<owl:disjointWith rdf:resource="#professor"/>

<owl:disjointWith rdf:resource="#assistantProfessor"/>

</owl:Class>

Someone who is an associate professor is not either a professor or an assistant professor

<owl:Class rdf:ID="faculty">

<owl:equivalentClass rdf:resource="#academicStaffMember"/>

</owl:Class>

Define Faculty class to be equivalent to academicStaffMember class

Disjoint

Equivalence

18 of 82

Two Special Classes

owl:Thing

owl:Nothing

Set of all individuals

Empty set

19 of 82

Property Elements

  • Data Properties (Concrete Roles)
    • owl:DataTypeProperty

<owl:DatatypeProperty rdf:ID="age">

<rdfs:range rdf:resource=

"http://www.w3.org/2001/XMLSchema#nonNegativeInteger"/>

</owl:DatatypeProperty>

20 of 82

Property Elements

    • Object Properties (Abstract Roles)
      • owl:ObjectProperty

<owl:ObjectProperty rdf:ID="isTaughtBy">

<rdfs:domain rdf:resource="#course"/>

<rdfs:range rdf:resource="#academicStaffMember"/>

<rdfs:subPropertyOf rdf:resource="#involves"/>

</owl:ObjectProperty>

21 of 82

Property Elements

<owl:ObjectProperty rdf:ID="teaches">

<owl:inverseOf rdf:resource="#isTaughtBy"/>

#<rdfs:range rdf:resource="#course"/>

#<rdfs:domain rdf:resource="#academicStaffMember"/>

</owl:ObjectProperty>

Inverse Properties

owl:inverseOf

<owl:ObjectProperty rdf:ID="lecturesIn">

<owl:equivalentProperty rdf:resource="#teaches"/>

</owl:ObjectProperty>

Equivalent Properties

owl:equivalentProperty

22 of 82

Property Restrictions

<owl:Class rdf:about="#firstYearCourse">

<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty rdf:resource="#isTaughtBy"/>

<owl:allValuesFrom rdf:resource="#Professor"/>

</owl:Restriction>

</rdfs:subClassOf>

</owl:Class>

Defining the class of all possible values that a property can take

owl:allValuesFrom

first year courses are taught by only professors

23 of 82

Property Restrictions

<owl:Class rdf:about="#academicStaffMember">

<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty rdf:resource="#teaches"/>

<owl:someValuesFrom rdf:resource="#undergraduateCourse"/>

</owl:Restriction>

</rdfs:subClassOf>

</owl:Class>

Defining the class of some possible values that a property can take

owl:someValuesFrom

all academic staff members must teach at least one undergraduate course

24 of 82

Property Restrictions

<owl:Class rdf:about="#mathCourse">

<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty rdf:resource="#isTaughtBy"/>

<owl:hasValue rdf:resource="#949352"/>

</owl:Restriction>

</rdfs:subClassOf>

</owl:Class>

A specific value that a property can take

owl:hasValue

mathematics courses are taught by staff member with

ID 949358

25 of 82

Property Restrictions

<owl:Class rdf:about="#course">

<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty rdf:resource="#isTaughtBy"/>

<owl:minCardinality>

1

</owl:minCardinality>

</owl:Restriction>

</rdfs:subClassOf>

</owl:Class>

Maximum and minimum cardinality

owl:maxCardinality owl:minCardinality

every course is taught by at least someone

26 of 82

OWL Special Properties

  • OWL Symmetric Property
    • Statements
      • exchangedFlagWith isA SymmetricProperty
      • Messi exchangedFlagWith Ronaldo
    • Inferences
      • Ronaldo exchangedFlagWith Messi

  • OWL Transitive Property
    • Statements
      • heavierThan isA TransitiveProperty
      • Jupiter heavierThan Earth
      • Earth heavierThan Venus
    • Inferences
      • Jupiter heavierThan Venus

27 of 82

OWL Functional Property

  • To express uniqueness property
    • property with min cardinality 0 and max cardinality 1

  • Statements
    • hasBirthdate isA FunctionalProperty
    • TimBernersLee hasBirthdate “1955-06-08”
    • TimBernersLee hasBirthdate “1955-01-08”

  • Inferences
    • Either “195-06-08” and “1955-01-08” are same dates (which is not the case)
      • Error in ontology: an individual may have only one unique value for the hasBirthdate property

28 of 82

OWL Inverse Functional Property

  • Inverse of the property is functional

  • Statements
    • bioMotherOf isA InverseFunctionalProperty
    • Kunti is bioMotherOf Arjuna
    • Pritha bioMotherOf Arjuna

  • Inferences
    • Only one individual may have one mother
    • Either Kunti and Pritha are same individuals or
    • Inconsistent ontology

29 of 82

OWL Inverse Functional Property

bioMotherOf (invFunc)

Arjuna

Pritha

Kunti

bioMotherOf (invFunc)

hasBioMother (func)

hasBioMother (func)

30 of 82

Boolean Combinations

<owl:Class rdf:about="#course">

<rdfs:subClassOf>

<owl:complementOf rdf:resource="#staffMember"/>

</rdfs:subClassOf>

</owl:Class>

Set complement operation

owl:complementOf

Courses and staff members are complement

31 of 82

Boolean Combinations

<owl:Class rdf:ID="peopleAtUni">

<owl:equivalentClass>

<owl:unionOf rdf:parseType="Collection">

<owl:Class rdf:about="#staffMember"/>

<owl:Class rdf:about="#student"/>

</owl:unionOf>

</owl:equivalentClass>

</owl:Class>

Set union operation

owl:unionOf

People at university consist of staff members and students

32 of 82

Boolean Combinations

<owl:Class rdf:ID="facultyInCS">

<owl:equivalentClass>

<owl:intersectionOf rdf:parseType="Collection">

<owl:Class rdf:about="#faculty"/>

<owl:Restriction>

<owl:onProperty rdf:resource="#belongsTo"/>

<owl:hasValue rdf:resource="#CSDepartment"/>

</owl:Restriction>

</owl:intersectionOf>

</owl:equivalentClass>

</owl:Class>

Set intersection operation

owl:inersectionOf

CS faculty is set equal to the intersection of faculty set and set of all objects from CS department

33 of 82

Boolean Enumeration

<owl:Class rdf:ID=“WineColor">

<owl:oneOf rdf:parseType="Collection">

<owl:Thing rdf:about="#White"/>

<owl:Thing rdf:about="#Red"/>

<owl:Thing rdf:about="#Rose"/>

</owl:oneOf>

</owl:Class>

Enumerate a set of individuals

owl:oneOf

Winecolor = {White, Red, Rose}

34 of 82

Defining Individuals

<rdf:Description rdf:ID=“949352”>

<rdf:type> rdf:resource=“#academicStaffMember”

</rdf:Description>

<academicStaffMember rdf:ID=“949352”/>

<owl:NamedIndividual rdf:about=“949352”/>

<rdf:type rdf:resource=“#academicStaffMember”/>

35 of 82

Open World Assumption and Individuals

<owl:ObjectProperty rdf:ID=“isTaughtBy”>

<rdf:type rdf:resource=“&owl;FunctionalProperty” />

</rdf:ObjectProperty>

<course rdf:ID=“CIT1111”>

<isTaughtBy rdf:resource = “#949318”/>

<isTaughtBy rdf:resource = “#949352”/>

</course>

<lecturer rdf:ID=“949318”>

<owl:differentFrom rdf:resource=“#949352”/>

</course>

<lecturer rdf:ID=“949318”>

<owl:sameAs rdf:resource=“#949352”/>

</course>

36 of 82

Defining Distinct Individuals

<owl:AllDifferent>

<owl:distinctMembers rdf:parseType=“Collection”>

<lecturer rdf:about=“#949318” />

<lecturer rdf:about=“#949352” />

<lecturer rdf:about=“#949111” />

</owl:distinctMembers>

</owl:AllDifferent>

37 of 82

OWL Elements

38 of 82

OWL Elements

39 of 82

OWL 2 Extension

  • Type separation
    • Class names, role names and individual names must be distinct in OWL 1
    • Class name may be used as role name in OWL 2

<owl:Class rdf:about=“Professor“ />

<Professor rdf:about=“rudiStuder” />

<owl:Class rdf:about=“Institute” />

<owl:ObjectProperty rdf:about=“Professor” />

<Institute rdf:about=“aifb”>

<Professor rdf:resource=“rudiStuder”/>

</Institute>

A name must not stand for both an abstract and an concrete role

40 of 82

OWL 2 Extension

<owl:AllDisjointClasses>

<owl:members rdf:parseType="Collection">

<owl:Class rdf:about="#UndergraduateStudent"/>

<owl:Class rdf:about="#GraguateStudent"/>

<owl:Class rdf:about="#OtherStudent"/>

</owl:members>

</owl:AlllDisjointClasses>

Disjoint Classes more than two

owl:disjointWith owl:AllDisjointClasses

41 of 82

OWL 2 Extension

  • Role characteristics and relationships
    • Asymmetric property
      • If A is related to B via such a role, B is never related to A via this role
      • owl:AsymmetricProperty
    • Reflexive property
      • Every individual A is related to itself via such a role
      • owl:reflexiveProperty
    • IrreflexiveProperty
      • No individual is related to itself via such a role
      • owl:IrreflexiveProperty

42 of 82

OWL 2 Extension

  • Extensions on properties
    • Disjoint properties
      • owl:propertyDisjointWith
    • More than two disjoint properties
      • owl:AllDisjointProperties
    • Top and Bottom abstract property
      • owl:topObjectProperty
      • owl:bottomObjectProperty
    • Top and Bottom concrete property
      • owl:topDataProperty
      • owl:bottomDataProperty

43 of 82

OWL 2 Extension

<owl:ObjectProperty rdf:about=“hasExaminer”>

<rdfs:subPropertyOf>

<owl:ObjectProperty>

<owl:inverseOf rdf:resource=“participatedIn”>

</owl:ObjectProperty>

</rdfs:subPropertyOf>

<owl:ObjectProperty>

Inverse property

owl:inverseOf

If exam A has the person B as examiner, then B participates in A; Not every B participating in exam A is an examiner in A

44 of 82

OWL 2 Extension

A

hasExaminer

participtedIn

hasExaminer

participatedIn

subPropertyOf

inverseOf

B1

B2

hasParticipation

45 of 82

OWL 2 Extension

<owl:ObjectProperty rdf:about=“hasUncle”>

<owl:propertyChainAxiom rdf:parseType=“Collection”>

<owl:ObjectProperty rdf:resource=“hasParent”>

<owl:ObjectProperty rdf:resource=“hasBrother”>

<owl:propertyChainAxiom>

<owl:ObjectProperty>

Role Chains

owl:propertyChainAxiom

 

Concrete roles must not be used

46 of 82

OWL 2 Extension

<owl:Class rdf:about=“Exam”>

<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty rdf:resource=“hasExaminer”/>

<owl:maxQualifiedCardinality>

2

<owl:maxQualifiedCardinality>

<owl:onClass rdf:resource=“Professor”>

</owl:Restriction>

</rdfs:subClassOf>

</owl:Class>

Qualified Cardinality Restrictions

owl:qualifiedCardinality, owl:minQualifiedCardinality owl:maxQualifiedCardinality

47 of 82

OWL 2 Extension

<owl:Class rdf:about=“SelfTaughtStudent”>

<owl:equivalentClass>

<owl:Restriction>

<owl:onProperty rdf:resource=“teaches”/>

<owl:hasSelf rdf:datatype=“&xsd;boolean”>true<owl:hasSelf />

</owl:Restriction>

</owl:equivalentClass>

</owl:Class>

Self Construct

owl:hasSelf

48 of 82

OWL 2 Extension

<owl:NegativePropertyAssertion>

<owl:sourceIndividual rdf:about=“John Nash” />

<owl:assertionProperty rdf:about=“hasColleague” />

<owl:targetIndividual rdf:about=“Alan Turing”>

</owl:NegativePropertyAssertion>

Negated Role Assignments

owl:NegativePropertyAssertion

49 of 82

OWL 2: Functional Style Syntax Specification

Primary Resource

Rector A. et al. (2004) OWL Pizzas: Practical Experience of Teaching OWL-DL: Common Errors & Common Patterns. Engineering Knowledge in the Age of the Semantic Web. EKAW 2004. Springer, Berlin, Heidelberg

50 of 82

Frequent Modelling Errors

  • Whether equivalent or subclass
  • Nothing is implicit
  • Class disjointness is taken for granted
  • Notoriety of Open World Assumption
  • Boolean combination with quantifiers
    • Some not or not some

51 of 82

Defined Vs. Primitive Class

  • Defined Class
    • Necessary and Sufficiency condition
    • Modelled with Equivalent class

  • Primitive Class
    • Necessary Condition
    • Modelled with Subclass

52 of 82

Equivalent Class

<owl:Class rdf:about="CheeseyPizza">

<owl:equivalentClass>

<owl:Class>

<owl:intersectionOf rdf:parseType="Collection">

<rdf:Description rdf:about="Pizza"/>

<owl:Restriction>

<owl:onProperty rdf:resource="hasTopping"/>

<owl:someValuesFrom rdf:resource="CheeseTopping"/>

</owl:Restriction>

</owl:intersectionOf>

</owl:Class>

</owl:equivalentClass>

</owl:Class>

A cheesy pizza is any pizza that has, amongst other things,

some cheese topping

53 of 82

Equivalent Class

A cheesy pizza is any pizza that has, amongst other things,

some cheese topping

 

Pizza

rdf:type

:hasTopping

 

rdf:type

Cheese

:hasTopping

 

rdf:type

Meat

CheesyPizza

rdf:type

54 of 82

Equivalent Class

EquivalentClasses(CheesyPizza

ObjectIntersectionOf(

Pizza

ObjectSomeValuesFrom

(hasTopping Cheese)))

A cheesy pizza is any pizza that has, amongst other things,

some cheese topping

55 of 82

Sub Class

<owl:Class rdf:about=“MargheritaPizza”>

<rdfs:subClassOf>

<owl:Class>

<owl:intersectionOf rdf:parseType=“Collection”>

<owl:Restriction>

<owl:onProperty rdf:resource=“hasTopping”/>

<owl:someValuesFrom rdf:about="MozzarellaTopping“/>

</owl:Restriction>

<owl:Restriction>

<owl:onProperty rdf:resource=“hasTopping”/>

<owl:someValuesFrom rdf:about=" TomatoTopping”/>

</owl:Restriction>

</ owl:intersectionOf>

</owl:Class>

<rdfs:subClassOf>

</owl:Class>

All Margherita pizzas have, amongst other things, some mozzarella topping and also some tomato topping

56 of 82

Sub Class

SubClassOf(MargheritaPizza

ObjectIntersectionOf(

ObjectSomeValuesFrom

(hasTopping Mozzarella)

ObjectSomeValuesFrom

(hasTopping Tomato)))

All Margherita pizzas have, amongst other things, some mozzarella topping and also some tomato topping

57 of 82

Sub Class

SubClassOf(MargheritaPizza

ObjectSomeValuesFrom (hasTopping

ObjectIntersectionOf( Mozzarella Tomato)))

All Margherita pizzas have, amongst other things, some mozzarella topping and also some tomato topping

58 of 82

Sub Class

All Margherita pizzas have, amongst other things, some mozzarella topping and also some tomato topping

 

:hasTopping

 

rdf:type

Mozzarella

:hasTopping

 

rdf:type

Tomato

MargheritaPizza

rdf:type

 

:hasTopping

 

rdf:type

Mozzarella

rdf:type

Tomato

MargheritaPizza

rdf:type

59 of 82

Stating Disjointness

<owl:AllDisjointClasses>

<owl:members rdf:parseType="Collection">

<owl:Class rdf:about="#Vegetable"/>

<owl:Class rdf:about="#Meat"/>

<owl:Class rdf:about="#Seafood"/>

<owl:Class rdf:about="#Cheese"/>

</owl:members>

</owl:AlllDisjointClasses>

Vegetable, Meat, Seafood Cheese are all Disjoint

DisjointClasses(Vegetable Meat Seafood Cheese)

60 of 82

<owl:Class rdf:about=“DogOwner”>

<owl:equivalentClass>

<owl:Class>

<owl:intersectionOf rdf:parseType=“Collection”>

<rdf:Description rdf:about=“Person”/>

<owl:Restriction>

<owl:onProperty rdf:resource=“hasPet”/>

<owl:someValuesFrom rdf:resource=“Dog”/>

</owl:Restriction>

</owl:intersectionOf>

</owl:Class>

</owl:equivalentClass>

</owl:Class>

A dog owner is any person who has as a pet some dog

61 of 82

SomeValuesFrom: Existensial

EquivalentClasses(DogOwner

ObjectIntersectionOf(

Person

ObjectSomeValuesFrom

(hasPet Dog)))

A dog owner is any person who has as a pet some dog

62 of 82

AllValuesFrom: Universal

<owl:Class rdf:about=“FirstClassLounge”>

<owl:equivalentClass>

<owl:Class>

<owl:intersectionOf rdf:parseType=“Collection”>

<rdf:Description rdf:about=“Lounge”/>

<owl:Restriction>

<owl:onProperty rdf:resource=“hasOccupant”/>

<owl:allValuesFrom rdf:resource=“FirstClassPassenger”/>

</owl:Restriction>

</owl:intersectionOf>

</owl:Class>

</owl:equivalentClass>

</owl:Class>

A first class lounge is any lounge where the occupants are

only first class passengers

63 of 82

AllValuesFrom: Universal

EquivalentClasses(FirstClassLounge

ObjectIntersectionOf(

Lounge

ObjectAllValuesFrom

(hasOccupant FirstClassPassenger)))

A first class lounge is any lounge where the occupants are

only first class passengers

64 of 82

AllValuesFrom: Universal

 

:occupant

 

rdf:type

FCP

:occupant

 

rdf:type

FCP

FirstClassLounge

rdf:type

A first class lounge is any lounge where the occupants are

only first class passengers

rdf:type

Lounge

 

:occupant

 

rdf:type

FCP

:occupant

 

rdf:type

SCP

FirstClassLounge

rdf:type

rdf:type

Lounge

65 of 82

<owl:Class rdf:about=“VegPizza”>

<owl:equivalentClass>

<owl:Class>

<owl:intersectionOf rdf:parseType=“Collection”>

<rdf:Description rdf:about=“Pizza”/>

<owl:Restriction>

<owl:onProperty rdf:resource=“hasTopping”/>

<owl:allValuesFrom>

<owl:unionOf rdf:parseType=“Collection”>

<rdf:Description rdf:about=“Vegetable”/>

<rdf:Description rdf:about=“Cheese”/>

</owl:unionOf>

</owl:allValuesFrom>

</owl:Restriction>

</owl:intersectionOf>

</owl:Class>

</owl:equivalentClass>

</owl:Class>

A vegetarian pizza is any pizza which, amongst other things, has only vegetable and/or cheese toppings

66 of 82

EquivalentClasses(VegPizza

ObjectIntersectionOf(

Pizza

ObjectAllValuesFrom(hasTopping

ObjectUnionOf

(Vegetable Cheese))))

A vegetarian pizza is any pizza which, amongst other things, has

only vegetable and/or cheese toppings

67 of 82

A vegetarian pizza is any pizza which, amongst other things, has only vegetable and/or cheese toppings

 

Pizza

rdf:type

:hasTopping

 

rdf:type

Veg

:hasTopping

 

rdf:type

Cheese

VegPizza

rdf:type

Pizza

rdf:type

:hasTopping

 

rdf:type

Veg

VegPizza

rdf:type

 

68 of 82

<owl:Class rdf:about=“ProtienLoversPizza”>

<owl:equivalentClass>

<owl:Class>

<owl:intersectionOf rdf:parseType=“Collection”>

<rdf:Description rdf:about=“Pizza”/>

<owl:Restriction>

<owl:onProperty rdf:resource=“hasTopping”/>

<owl:allValuesFrom>

<owl:intersectionOf rdf:parseType=“Collection”>

<rdf:Description rdf:about=“Meat”/>

<rdf:Description rdf:about=“SeaFood”/>

</owl:intersectionOf>

</owl:allValuesFrom>

</owl:Restriction>

</owl:intersectionOf>

</owl:Class>

</owl:equivalentClass>

</owl:Class>

A protein lover’s pizza is any pizza that, amongst other things, has only toppings that are both meat and also seafood

69 of 82

EquivalentClasses(ProtienLoversPizza

ObjectIntersectionOf(

Pizza

ObjectAllValuesFrom(hasTopping

ObjectIntersectionOf

(Meat SeaFood))))

A protein lover’s pizza is any pizza that, amongst other things, has only toppings that are both meat and also seafood

70 of 82

A protein lover’s pizza is any pizza that, amongst other things, has only toppings that are both meat and also seafood

 

Pizza

rdf:type

:hasTopping

 

rdf:type

Meat

:hasTopping

 

rdf:type

Seafood

ProtienLoverPizza

rdf:type

rdf:type

rdf:type

71 of 82

Complement

  • ObjectComplementOf(ObjectIntersectionOf(class1 class2))
    • ‘not both class1 and also class2’

  • ObjectComplementOf(ObjectUnionOf(class1 class2))
    • ‘neither class1 nor class2’

  • ObjectSomeValuesFrom(prop ObjectComplementOf(class))
    • ‘has some prop that are not class’
    • some(hasParticipation not(Professor))

72 of 82

Complement

  • ObjectComplementOf(ObjectSomeValuesFrom(prop class))
    • does not have any prop that are class
    • not(some(hasExaminer ExamSubjectStudent))

  • ObjectAllValuesFrom(prop ObjectComplementOf(class))
    • has only prop that are not class
    • only(hasExaminer not(ExamSubjectStudent))

  • ObjectComplementOf(ObjectAllValuesFrom(prop class))
    • does not have only prop that are class
    • not(only(hasParticipation Faculty ))

73 of 82

‘Some’ does not imply ‘Only’

SubClassOf(MargheritaPizza

ObjectIntersectionOf(

ObjectSomeValuesFrom

(hasTopping Mozzarella)

ObjectSomeValuesFrom

(hasTopping Tomato)))

SubClassOf(MargheritaPizza

ObjectIntersectionOf( ObjectSomeValuesFrom

(hasTopping Mozzarella)

ObjectSomeValuesFrom

(hasTopping Tomato)

ObjectAllValuesFrom

(hasTopping ObjectUnionOf

(Mozzarella Tomato))))

All Margherita pizzas have, amongst

other things, some mozzarella topping

and also some tomato topping

But, these “Margherita pizzas” might also have, say, spicy beef topping

All Margherita pizzas have, amongst

other things, some mozzarella topping

and also some tomato topping

and also have only mozzarella and/or tomato topping

74 of 82

 

 

 

 

Satisfied

 

 

Satisfied

 

Not Satisfied

 

75 of 82

‘Only’ does not imply ‘Some’

SubClassOf(EmptyPizza

ObjectComplementOf(

ObjectSomeValuesFrom

(hasTopping owl:Thing)))

EquivalentClasses(VegPizza

ObjectIntersectionOf(

Pizza

ObjectAllValuesFrom (hasTopping

ObjectComplementOf (Meat)))

ObjectAllValuesFrom (hasTopping

ObjectComplementOf (Fish)))))

All empty pizzas, amongst other things, do not have anything as topping

Empty pizza satisfies the definition of vegetarian pizza

A vegetarian pizza is any pizza which, amongst other things, has only topping that is not meat and also has only topping that is not fish.

76 of 82

Confusion between “some not” and “not some”

EquivalentClasses(VegetarianPizzaW

ObjectIntersectionOf(

Pizza

ObjectSomeValuesFrom

(hasTopping (

ObjectComplementOf(Meat)))

ObjectSomeValuesFrom

(hasTopping (

ObjectComplementOf(Seafood))))

A vegetarian pizza (w) is any pizza that, amongst other things, both has

some topping which is not meat and also some topping which is not seafood

77 of 82

Confusion between “some not” and “not some”

EquivalentClasses(VegetarianPizzaC

ObjectIntersectionOf(

Pizza

ObjectComplementOf(

ObjectSomeValuesFrom

(hasTopping Meat))

ObjectComplementOf(

ObjectSomeValuesFrom

(hasTopping Seafood))))

A vegetarian pizza (c) is any pizza that, amongst other things, both

does not have some meat topping and also does not have some seafood topping

78 of 82

A vegetarian pizza (w) is any pizza that, amongst other things, both has

some topping which is not meat and also some topping which is not seafood

A vegetarian pizza (c) is any pizza that, amongst other things, both

does not have some meat topping and also does not have some seafood topping

 

Pizza

rdf:type

:hasTopping

 

rdf:type

 

:hasTopping

 

rdf:type

 

VegPizzaW

rdf:type

 

Pizza

rdf:type

:hasTopping

 

rdf:type

Meat

:hasTopping

 

rdf:type

Seafood

VegPizzaC

rdf:type

 

:hasTopping

Meat

rdf:type

79 of 82

Cardinality Constraints

EquivalentClasses(InterestingPizza

ObjectIntersectionOf(

Pizza

ObjectMinCardinality

(3 hasTopping)))

An interesting pizza is any pizza that, amongst other things, has

at least 3 (distinct) toppings

SubClassOf(Pizza

ObjectMaxCardinality(1 hasBase))

Any pizza, amongst other things, has at most 1 pizza base

80 of 82

An interesting pizza is any pizza that, amongst other things, has at least 3 (distinct) toppings

 

Pizza

rdf:type

:hasTopping

 

:hasTopping

 

InterestingPizza

rdf:type

 

:hasTopping

Owl:differentFrom

81 of 82

Modest are those people who do not praise themselves

EquivalentClasses(ModestPerson

ObjectIntersectionOf(

Person

ObjectComplementOf(

ObjectHasSelf

(praise))))

82 of 82

All old ladies must have a pet and the pets can only be cats

SubClassOf(OldLady

ObjectIntersectionOf(

ObjectSomeValuesFrom

(hasPet owl:Thing)

ObjectAllValuesFrom

(hasPet Cat)))