1 berendt: knowledge and the web, 1st semester 2014/2015, berendt/teaching/ 1 knowledge and the web...
TRANSCRIPT
1Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
1
Knowledge and the Web
Inference on the Semantic Web
Bettina Berendt
KU Leuven, Department of Computer Science
http://people.cs.kuleuven.be/~bettina.berendt/teaching/
Last update: October 15, 2014
2Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
2
Agenda
OWL: Protégé interface, XML/RDF
OWL viewed as a description logics: basics
OWL: another syntax (for the examples that follow)
OWL inference examples
Common problems in using OWL reasoning
3Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
3
Agenda
OWL: Protégé interface, XML/RDF
OWL viewed as a description logics: basics
OWL: another syntax (for the examples that follow)
OWL inference examples
Common problems in using OWL reasoning
4Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
4
Motivation; deductive and inductive reasoning (ex.s)
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: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
5
(OWL slides)
http://people.cs.kuleuven.be/~bettina.berendt/teaching/2014-15-1stsemester/kaw/OWL.pdf
6Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
6
Agenda
OWL: Protégé interface, XML/RDF
OWL viewed as a description logics: basics
OWL: another syntax (for the examples that follow)
OWL inference examples
Common problems in using OWL reasoning
7Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
7
OWL Abstract Syntax / OWL Functional Syntax (ex. 1)
<owl:Class rdf:ID="Bus">
<rdfs:subClassOf rdf:resource="#Vehicle"/>
</owl:Class>
Class(bus partial vehicle)
XML/RDF
Functional syntax
Pro-tégé
8Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
8
OWL Abstract Syntax / OWL Functional Syntax (ex. 2)
<owl:Class rdf:ID="Bus_driver">
<owl:equivalentClass>
<owl:Class>
<owl:intersectionOf rdf:parseType="Collection">
<owl:Restriction>
<owl:onProperty rdf:resource="#drives"/>
<owl:someValuesFrom rdf:resource="#Bus"/>
</owl:Restriction>
<owl:Class rdf:about="#Person"/>
</owl:intersectionOf>
</owl:Class>
</owl:equivalentClass>
</owl:Class>
(in the Protégé editor:“Person and drives some Bus“ )
Class(bus_driver complete intersectionOf( person restriction(drives someValuesFrom (bus))))
9Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
9
Agenda
OWL: Protégé interface, XML/RDF
OWL viewed as a description logics: basics
OWL: another syntax (for the examples that follow)
OWL inference examples
Common problems in using OWL reasoning
10Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
10
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
11Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
11
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))))
12Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
12
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))
13Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
13
Examples: Class inferences (4)
Class(a:sheep partial a:animal restriction(a:eats allValuesFrom (a:grass)))
Class(a:grass partial a:plant)
DisjointClasses(
unionOf(a:animal restriction(a:part_of someValuesFrom
(a:animal)))
unionOf(a:plant restriction(a:part_of someValuesFrom
(a:plant))))
Class(a:vegetarian complete intersectionOf(
a:animal
restriction(a:eats allValuesFrom
(complementOf(a:animal)))))
restriction(a:eats allValuesFrom
(complementOf(restriction(a:part_of someValuesFrom
(a:animal)))))
This was missing on your printouts
14Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
14
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(
a:animal
restriction(a:eats allValuesFrom
(complementOf(restriction(a:part_of someValuesFrom
(a:animal)))))
restriction(a:eats allValuesFrom (complementOf(a:animal)))))
15Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
15
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 someValuesFrom (a:animal))
restriction(a:has_pet allValuesFrom (a:cat))))
Class(a:cat_owner complete intersectionOf(
a:person
restriction(a:has_pet someValuesFrom (a:cat))))
16Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
16
Examples: Class inferences (7)Class(a:cow partial a:vegetarian)
DisjointClasses(
unionOf(a:animal restriction(a:part_of someValuesFrom (a:animal)))
unionOf(a:plant restriction(a:part_of someValuesFrom (a:plant))))
Class(a:vegetarian complete intersectionOf( a:animal
restriction(a:eats allValuesFrom
(complementOf(restriction(a:part_of someValuesFrom
(a:animal)))))
restriction(a:eats allValuesFrom (complementOf(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)))
17Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
17
Examples: Instance inferences (1)
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))
18Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
18
Examples: Instance inferences (2)
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)))
19Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
19
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))))
20Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
20
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 someValuesFrom (a:animal))
restriction(a:has_pet allValuesFrom (a:cat ))))
21Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
21
Agenda
OWL: Protégé interface, XML/RDF
OWL viewed as a description logics: basics
OWL: another syntax (for the examples that follow)
OWL inference examples
Common problems in using OWL reasoning
22Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
22
Properties and existential restrictions
Yet another syntax:Read this as
intersectionOf (Pizza restriction1 restriction2)
23Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
23
Primitive and defined classes
24Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
24
Open world reasoning (1)
25Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
25
Open world reasoning (2): Is this a Margherita Pizza?
26Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
26
Open world reasoning (3): closure restrictions/axioms – what does this exclude?
27Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
27Domain and range restrictions are axioms – or: when should you not use domain/range, but restrictions instead?
28Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
28
„and“ and „or“ in logics vs. in natural language, “all“ vs. “some“- what do these 2 definitions say? Is this the intention? How can it be expressed better?
29Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
29
Does „only“ (allValuesFrom) imply „some“ (someValuesFrom)?
Is an EmptyPizza a VegetarianPizza?
30Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
30„some not …“ vs. „not some …“:what does this definition say? Is this the intention? How can it be expressed better?
32Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
32
Outlook
OWL: Protégé interface, XML/RDF
OWL viewed as a description logics: basics
OWL: another syntax (for the examples that follow)
OWL inference examples
Common problems in using OWL reasoning
Combining SW data: Schema/ontology matching
33Berendt: Knowledge and the Web, 1st semester 2014/2015, http://www.cs.kuleuven.be/~berendt/teaching/
33
Used sources
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/
OWL Abstract Syntax: A short summary here: http://www.csee.umbc.edu/courses/691s/notes/12absyntax.pdf
pp. 10ff.: Bechhofer, S. (2003). OWL Reasoning Examples. http://owl.man.ac.uk/2003/why/20031203
pp. 22ff.: 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://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.107.7584
Picture credits: see PPT „comments“ field