1 berendt: advanced databases, 1st semester 2012/2013, berendt/teaching/ 1 advanced databases –...
TRANSCRIPT
1Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
1
Advanced databases –
Inference on
the Semantic Web
Bettina Berendt
Katholieke Universiteit Leuven, Department of Computer Science
http://people.cs.kuleuven.be/~bettina.berendt/teaching/
Last update: 17 October 2012
2Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
2
Agenda
Introduction / motivation; kinds of reasoning
Properties of Properties (cf. the Pizza Tutorial)
Class descriptions, cardinality, & value constraints
Does this type of knowledge exist in LOD?
Common problems in using OWL reasoning
3Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
3
Recall: Task from the previous week
Given
your knowledge of logic
and the presence of interconnected data sources such as those shown on p. 63:
What inferences would you want to draw (that go beyond data retrieval)?
Name 3 examples. Be as concrete or as abstract as you want.
(Recall: retrieval is just getting the data – a standard SELECT statement with some selections and projections would be a typical example of retrieval in the SQL world
Inference is concluding more from this – it starts with operators such as COUNT or MAX in SELECT statements and then goes as far as logic or other ways of data processing take you)
4Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
4
Motivation; deductive and inductive reasoning (ex.s)
< Example shown in Protégé >
Approach in this lecture: „Data++“ or: understanding OWL as a conceptual modelling tool à la EER or UML class diagrams plus logic
Deductive reasoning All swans are white.
Tilly is a swan.
Tilly is white.
Truth-preserving!
Inductive reasoning Tilly and Edda and Edwin and … are swans.
Tilly and Edda and Edwin and … are white.
All swans are white.
„Bringing new knowledge into the world“
5Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
5
Agenda
Introduction / motivation; kinds of reasoning
Properties of Properties (cf. the Pizza Tutorial)
Class descriptions, cardinality, & value constraints
Does this type of knowledge exist in LOD?
Common problems in using OWL reasoning
6Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
6
OWL Properties (Object and/or Datatype ~) can be …
Functional
Inverse functional (or: Inverse of another relation)
Transitive
Symmetric
Asymmetric
Reflexive
Irreflexive
… and this allows for inferences on individuals (see Pizza Tutorial)
7Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
7
Agenda
Introduction / motivation; kinds of reasoning
Properties of Properties (cf. the Pizza Tutorial)
Class descriptions, cardinality, & value constraints
Does this type of knowledge exist in LOD?
Common problems in using OWL reasoning
8Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
8
Please note
The language elements shown on the following slides are not available in all of OWL‘s versions (Lite, DL, Full) and/or are restricted in different ways in these versions. Also, OWL2 is a different matter altogether.
We concentrate on OWL DL, i.e. the version that Protégé uses.
For all OWL snippets shown on the following slides, we‘ll ask:
What does it mean? (Paraphrase in natural language)
What does it imply? (= What will a reasoner infer?)
Please note that the 2 sets of examples have a slightly different syntax, inspired by OWL XML notation or Protégé
9Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
9
Class descriptions
Classes can be described/defined as the
UnionOf
complementOf
IntersectionOf
other classes, or as the
enumeration of instances (via oneOf )
10Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
10
Cardinality constraints
0/1
≥ 0
MinCardinality
MaxCardinality
11Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
11
Value constraints
allValuesFrom
someValuesFrom
hasValue
12Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
12
Examples: Class inferences (1)
Class(a:bus_driver complete intersectionOf(a:person
restriction(a:drives someValuesFrom (a:bus))))
Class(a:driver complete intersectionOf(a:person
restriction(a:drives someValuesFrom (a:vehicle))))
Class(a:bus partial a:vehicle)
Note: a is the namespace used throughout these examples
13Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
13
Examples: Class inferences (2)
Class(a:cat_owner complete intersectionOf(a:person
restriction(a:has_pet someValuesFrom (a:cat))))
SubPropertyOf(a:has_pet a:likes)
Class(a:cat_liker complete intersectionOf(a:person
restriction(a:likes someValuesFrom (a:cat))))
14Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
14
Examples: Class inferences (3)
Class(a:driver complete intersectionOf(a:person
restriction(a:drives someValuesFrom (a:vehicle))))
Class(a:driver partial a:adult)
Class(a:grownup complete intersectionOf(a:adult a:person))
15Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
15
Examples: Class inferences (4)
Class(a:sheep partial
restriction(a:eats allValuesFrom (a:grass)) a:animal)
Class(a:grass partial a:plant)
DisjointClasses(unionOf(restriction(a:part_of someValuesFrom (a:animal)) a:animal)
unionOf(a:plant restriction(a:part_of someValuesFrom (a:plant))))
Class(a:vegetarian complete intersectionOf(
restriction(a:eats allValuesFrom (complementOf(restriction(a:part_of someValuesFrom (a:animal)))))
restriction(a:eats allValuesFrom (complementOf(a:animal))) a:animal))
16Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
16
Examples: Class inferences (5)
Class(a:giraffe partial a:animal
restriction(a:eats allValuesFrom (a:leaf)))
Class(a:leaf partial restriction(a:part_of someValuesFrom (a:tree)))
Class(a:tree partial a:plant)
DisjointClasses(unionOf(restriction(a:part_of someValuesFrom (a:animal)) a:animal)
unionOf(a:plant restriction(a:part_of someValuesFrom (a:plant))))
Class(a:vegetarian complete intersectionOf(
restriction(a:eats allValuesFrom (complementOf(restriction(a:part_of someValuesFrom (a:animal)))))
restriction(a:eats allValuesFrom (complementOf(a:animal))) a:animal))
17Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
17
Examples: Class inferences (6)
Class(a:old_lady complete
intersectionOf(a:person a:female a:elderly))
Class(a:old_lady partial intersectionOf(
restriction(a:has_pet allValuesFrom (a:cat))
restriction(a:has_pet someValuesFrom (a:animal))))
Class(a:cat_owner complete intersectionOf(a:person
restriction(a:has_pet someValuesFrom (a:cat))))
18Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
18
Examples: Class inferences (7)
Class(a:cow partial a:vegetarian)
DisjointClasses(unionOf(restriction(a:part_of someValuesFrom (a:animal)) a:animal) unionOf(a:plant restriction(a:part_of someValuesFrom (a:plant))))
Class(a:vegetarian complete intersectionOf(
restriction(a:eats allValuesFrom (complementOf(restriction(a:part_of someValuesFrom (a:animal)))))
restriction(a:eats allValuesFrom (complementOf(a:animal))) a:animal))
Class(a:mad_cow complete intersectionOf(a:cow
restriction(a:eats someValuesFrom (intersectionOf(restriction(a:part_of someValuesFrom (a:sheep)) a:brain)))))
Class(a:sheep partial a:animal restriction(a:eats allValuesFrom (a:grass)))
19Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
19
Examples: Instance inferences (1)
Individual(a:Daily_Mirror type(owl:Thing))
Individual(a:Nick type(a:male)
value(a:drives a:Q123_ABC)
value(a:reads a:Daily_Mirror))
Individual(a:Q123_ABC type(a:van) type(a:white_thing))
Class(a:white_van_man complete
intersectionOf(a:man restriction(a:drives someValuesFrom (intersectionOf(a:van a:white_thing)))))
Class(a:white_van_man partial restriction(a:reads allValuesFrom (a:tabloid)))
20Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
20
Examples: Instance inferences (2)
Individual(a:Spike type(owl:Thing)
value(a:is_pet_of a:Pete))
Individual(a:Pete
type(owl:Thing))
ObjectProperty(a:has_pet domain(a:person) range(a:animal))
ObjectProperty(a:is_pet_of inverseOf(a:has_pet))
21Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
21
Examples: Instance inferences (3)
Individual(a:Walt type(a:person)
value(a:has_pet a:Huey)
value(a:has_pet a:Louie)
value(a:has_pet a:Dewey))
Individual(a:Huey type(a:duck))
Individual(a:Dewey type(a:duck))
Individual(a:Louie type(a:duck))
DifferentIndividuals(a:Huey a:Dewey a:Louie)
Class(a:animal_lover complete intersectionOf(a:person restriction(a:has_pet minCardinality(3))))
22Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
22
Examples: Instance inferences (4)
Individual(a:Minnie type(a:female) type(a:elderly) value(a:has_pet a:Tom))
Individual(a:Tom type(owl:Thing))
ObjectProperty(a:has_pet domain(a:person) range(a:animal))
Class(a:old_lady complete
intersectionOf(a:person a:female a:elderly))
Class(a:old_lady partial intersectionOf(
restriction(a:has_pet allValuesFrom (a:cat))
restriction(a:has_pet someValuesFrom (a:animal))))
23Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
23
Agenda
Introduction / motivation; kinds of reasoning
Properties of Properties (cf. the Pizza Tutorial)
Class descriptions, cardinality, & value constraints
Does this type of knowledge exist in LOD?
Common problems in using OWL reasoning
24Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
24A recent empirical investigation of the occurrence of ontology concepts in LOD (Glimm, Hogan, Krötzsch, Polleres, Proc. LDOW 2012)
Note: the y axis is scaled logarithmically
25Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
25
(table is longer in the paper)
26Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
26
Agenda
Introduction / motivation; kinds of reasoning
Properties of Properties (cf. the Pizza Tutorial)
Class descriptions, cardinality, & value constraints
Does this type of knowledge exist in LOD?
Common problems in using OWL reasoning
27Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
27
Properties and existential restrictions
28Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
28
Primitive and defined classes
29Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
29
Open world reasoning (1)
30Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
30
Open world reasoning (2): Is this a Margherita Pizza?
31Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
31
Open world reasoning (3): closure restrictions/axioms
32Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
32
Domain and range restrictions are axioms
33Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
33
Does „only“ (allValuesFrom) imply „some“ (someValuesFrom)?
34Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
34
„and“ and „or“ in logics vs. in natural language
35Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
35
„some not …“ vs. „not some …“
36Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
36
Task for the next week
Find 3 ontological statements on the Semantic Web, for example using Sindice.
Paraphrase what they mean.
Find 1 statement involving owl:EquivalentClass . What problems are likely to arise when statements made about this class (with its two names) come from different knowledge sources?
37Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
37
Outlook
Introduction / motivation; kinds of reasoning
Properties of Properties (cf. the Pizza Tutorial)
Class descriptions, cardinality, & value constraints
Does this type of knowledge exist in LOD?
Common problems in using OWL reasoning
Combining SW data: Schema/ontology matching
38Berendt: Advanced databases, 1st semester 2012/2013, http://www.cs.kuleuven.be/~berendt/teaching/
38
Used sources
p. 8: OWL specification at
http://www.w3.org/TR/owl-ref/ resp. http://www.w3.org/TR/owl2-overview/
Difference between OWL Lite, DL, and Full by Ritesh Agrawal (2007) at http://ragrawal.wordpress.com/2007/02/20/difference-between-owl-lite-dl-and-full/
pp. 12-21: Bechhofer, S. (2003). OWL Reasoning Examples. http://owl.man.ac.uk/2003/why/20031203
pp. 24f: Glimm, B., Hogan, A., Krötzsch, M., & Polleres, A. (2012). OWL: Yet to arrive on the Web of Data? In the Proceedings of the Linked Data on the Web WWW2012 Workshop (LDOW 2012). Available at http://arxiv.org/abs/1202.0984
pp. 27-35: Alan L. Rector, Nick Drummond, Matthew Horridge, Jeremy Rogers, Holger Knublauch, Robert Stevens, Hai Wang, Chris Wroe: OWL Pizzas: Practical Experience of Teaching OWL-DL: Common Errors & Common Patterns. EKAW 2004: 63-81.
http://www.co-ode.org/resources/papers/ekaw2004.pdf
Picture credits: see PPT „comments“ field