程序代写代做 database flex C Semantic Technologies and Applications COMP5860M

Semantic Technologies and Applications COMP5860M
John Stell
Room 9.15, School of Computing
j.g.stell@leeds.ac.uk
Lecture 3: February 2020
1

Coursework Schedule
Coursework 1
Coursework 2
􏰀 Due in 13th March 2020
􏰀 Set by 21st February 2020
􏰀 Involves some practical work with Protege
􏰀 Due in 4th May 2020
􏰀 Set by 13th March 2020
􏰀 Involves research and writing a report on an
aspect of semantic technology
2

Practical Sessions
Labs will take place this week.
These are to help understand topics and coursework More information about this week’s labs on Tuesday
We will begin with Protege, a tool for constructing ontologies in OWL
3

Recap
􏰀 An
ontology will have:
􏰀 Classes / Concepts / Kinds of Thing
􏰀 Relationships / Properties
􏰀 An
􏰀 individuals
ontology usually also has:
􏰀 Classes and Relationships are like the schema of a database
􏰀 Individuals are like data in a database
􏰀 Open World vs Closed World is important
􏰀 Traditional relational database: Closed World
􏰀 Ontology: Open World
4

Change over time
Ontologies, Databases, Knowledge bases, etc all change over time
􏰀 The individuals that are of interest may change (e.g. students leave, people die, new people come in)
􏰀 Relationships between individuals may change (e.g. people become friends, know new people)
But a different kind of change is
􏰀 New classes may be needed
(e.g. ontologist hears of egg-laying mammals)
􏰀 New relationships may be needed
(e.g. civil partnerships distinct from marriage)
5

Relationships or Properties
a way in which individuals might be related, for example:
􏰀 parent of, child of, brother of, sister of, ancestor of, etc 􏰀 older than, younger than, taller than, heavier than, etc 􏰀 studies, teaches, studies with,
􏰀 is inside, is next to, overlaps with, etc
􏰀 is part of, has part
􏰀 earlier than, later than, at same time as, during, etc
􏰀 author of, editor of, illustrator of
􏰀 actor in, director of, script writer of
􏰀 was written in, was first screened,
􏰀 follows, is followed by, knows (person), is friend of, etc
6

Relationships or Properties
Beware: ‘is a’ is typically a relationship NOT between individuals but between an individual and a class or between classes
A class is a (potential) collection of individuals.
Saying that an individual belongs to a class is completely different from relating two individuals to each other.
For example, assuming Mother and Parent are classes:
Alice is a mother (individual is related to class)
Alice is a parent (individual is related to class)
Alice is a parent of Bill (relation between individuals)
Alice is the mother of Bill (relation between individuals)
The mother of Bill is Alice (relation between individuals)
A mother is a parent (this means all mothers are parents)
A lion is on the loose (this means some individual lion, not all) Mothers are parents (this means all mothers are parents)
7

Characteristics of Relationships or Properties
These are NOT about accidental features of particular individuals. They ARE about any individuals that could ever possibly be related
Example: the relationship ancestor of has the property:
If A is an ancestor of B, and B is an ancestor of C Then A is an ancestor of C.
But the has heard of relationship bewteen people does not even if it just happens that for all individuals in an ontology
If A is an has heard of B, and B is an has heard of C Then A is an has heard of C.
Ask yourself: would this property always hold whatever the individuals are?
8

Characteristics of Properties in Prot ́eg ́e
9

Characteristics of Properties: Dangers to avoid
In explaining characteristics it is possible to misunderstand things. When we say ‘Let a and b be two numbers’ we really mean:
‘a and b are two names for numbers (possibly the same number)’.
In a diagram like this, (without any further information) the dots might not all be different individuals, they could even all be the same individual.
It can help to think this way. A law that says:
If you drive a car you must have a driving licence
Applies to everyone, including people who never drive cars.
If you never drive and do not have a licence you obey the law If you never drive and do have a licence you obey the law
10

Characteristics of Properties
Characteristics where something is forbidden Characteristic Forbidden pattern
Functional
Inverse Functional
Asymmetric
Irreflexive
beware: irreflexive ̸= not reflexive
asymmetric ̸= not symmetric
11

Characteristics of Properties
Characteristics where one pattern implies another Characteristic then this happens too
If this ever happens
Transitive
Symmetric
Reflexive
Beware: It is not required that 1st pattern ever happens at all. Remember the driving licence example.
12

Properties of properties (Characteristics)
Examples (explained more in lecture)
property brother hasMother hasParent hasChild ancestorOf sameAgeAs youngerThan isMarriedTo teachesOn
fun inv-fun asymm irr trans symm refl
13