Semantic Technologies and Applications COMP5860M
John Stell
Room 9.15, School of Computing
j.g.stell@leeds.ac.uk
Lecture 6: February 2020
1
Number Restrictions
If R is a property (role) and n a non-negative integer then
≤ n R and ≥ n R and = n R are concepts.
For example: Criminal ⊓ (≥ 3 hasCar ) ⊑ SuccessfulCriminal This is for counting the number of things having a particular
property, not for talking about people who are more than 65. A qualified number restriction is one of these
≤ n R.C ≥ n R.C = n R.C
For example: (= 4 hasRoom.BedRoom) ⊓ ∀ hasRoom.Spacious Note that ≥ 1 R.C is equivalent to ∃ R.C
What could this mean? ≥ 2hasChild.(≥ 2hasChild.Female) and this? ≥ 2 hasChild .(≥ 2 hasLivedIn.City )
2
Statements about classes
“Undergraduate students are students” UnderGrad ⊑ Student
“Modules and students are disjoint”
Module ⊓ Student ≡ ⊥
“Every student is a postgrad or undergrad (or possibly both)” Student ⊑ UnderGrad ⊔ PostGrad
3
Statements about classes
“Undergrads and postgrads are students” (beware the “and” here modelled by ⊔)
UnderGrad ⊔ PostGrad ⊑ Student “People who are staff and students are postgrads”
(notice “and” modelled by ⊓)
Staff ⊓ Student ⊑ PostGrad
or more accurately:
Person ⊓ Staff ⊓ Student ⊑ PostGrad
but: “staff and students are people”
Staff ⊔ Student ⊑ Person
4
Ontology Construction is not easy
Knowledge is often expressed in natural language.
The examples we’ve seen show it’s not always easy to translate from natural language to a formal ontology.
The process of creating machine-readable ontologies from what people know requires a great deal of care and in real-world examples will involve
an appropriate methodology,
evaluation of the results
maintenance and review as bugs are found and purposes change and (possibly) as the world being modelled changes
5
Description Logic (DL) Concepts (Classes) summary
atomic concepts universal concept bottom concept negated concept concept intersection concept union
value restriction existential quantification number restrictions
names of concepts e.g. Human, Pizza
⊤
⊥
¬C
C ⊓ D C ⊔ D ∀r.C ∃r.C various
Instances are all things.
No instances. Empty concept. Instances are not in C. Instances of both C and D. Instances of C or D (or both). where r is a role
where r is a role
see earlier
concept equivalence concept subsumption
C ≡ D concepts have same instances C ⊑ D C is a sub-concept of D
6
DL Constructions on Roles (Properties)
R ⊔ S (union)
R ⊓ S (intersection)
¬R (complement)
R ◦ S (composition) Order is important (see last lecture) R+ (transitive closure)
R∗ (reflexive transtive closure)
R−1 or R− (inverse / converse)
id(C) (identity role on concept C)
7
More Examples
Atomic Concepts and Roles:
Female (concept)
Person (concept)
hasChild (role)
Woman ≡ Man ≡ Mother ≡ Father ≡ Parent ≡ ManWithoutSons ≡ Grandmother ≡
Person ⊓ Female
Person ⊓ ¬Female
Woman ⊓ ∃hasChild.Person Man ⊓ ∃hasChild.Person Mother ⊔ Father
Man ⊓ ∀hasChild.Female Mother ⊓ ∃hasChild.Parent
8
For Discussion
Given: Class (or Concept) PlaysFootball and Properties (or Roles): knows and hasChild we saw:
knowing someone who has a child who plays football ∃ (knows ◦ hasChild).PlaysFootball
having a child who knows someone who plays football ∃ (hasChild ◦ knows).PlaysFootball
How in description logic could we formulate the concept of knowing someone who plays football who has a child?
9
Exercise
Here are some atomic concepts (classes) and roles (properties).
Animal Insect Human LivingThing Carnivore Herbivore Plant
eats isEatenBy
10
Exercise
Express in Description Logic
1. Animals are living things
2. Plants and animals are living things.
3. Nothing is both a plant and an animal.
4. “Herbivore” means “animal that only eats plants”.
5. “Carnivore” means “living thing that eats animals (but may eat other things as well)”.
11
Exercise
Invent appropriate names for the following additional concepts (classes).
In these the “are” / “is” means “are exactly” / “is defined to be”. Write down the appropriate axioms.
1. Edible plants are plants that humans eat.
2. Carnivorous plants are plants that eat animals.
3. Insectivores are living things that eat insects.
4. An exclusive insectivore is one with a diet consisting entirely of insects.
5. Special insects are insects where some of the things that eat them only eat insects.
12