An Example OWL Ontology
An Example OWL Ontology
http://www.cs.man/ac/uk/horrocks/ISWC2003/Tutorial/people+pets.owl.rdf
so that OWL is part of the Semantic Web so that OWL can be an extension of RDF so that RDF applications can parse OWL
abstract syntax
http://www.cs.man/ac/uk/horrocks/ISWC2003/Tutorial/people+pets.abs easier to read and write manually corresponds more closely to Description Logics and Frames
Creating Ontologies
information in OWL is generally in an ontology ontologya branch of metaphysics concerned with the nature and relations of being [Merriam-Webster Dictionary] an ontology determines what is of interest in a domain and how information about it is structured an OWL ontology is just a collection of information, generally mostly information about classes and properties Ontology([name] ...) ontologies can include (import) information from other ontologies Ontology([name] owl:imports(<name>) ...)
6
Classes
What is a Class? e.g., person, pet, old a collection of individuals (object, things, . . . ) a way of describing part of the world an object in the world (OWL Full)
Example Classes
Class(pp:animal partial restriction(pp:eats someValuesFrom(owl:Thing))) Class(pp:person partial pp:animal) Class(pp:man complete intersectionOf(pp:person pp:male pp:adult)) Class(pp:animal+lover complete intersectionOf(pp:person restriction(pp:has_pet minCardinality(3))))
Example Classes
Class(pp:vegetarian complete intersectionOf(pp:animal restriction(pp:eats allValuesFrom(complementOf(pp:animal))) restriction(pp:eats allValuesFrom( complementOf(restriction(pp:part_of someValuesFrom(pp:animal))))))) DisjointClasses(pp:young pp:adult)
Properties
What is a Property? e.g., has father, has pet, service number a collection of relationships between individuals (and data) a way of describing a kind of relationship between individuals an object in the world (OWL Full)
10
Example Properties
ObjectProperty(pp:eaten_by) ObjectProperty(pp:eats inverseOf(pp:eaten_by) domain(pp:animal)) ObjectProperty(pp:has_pet domain(pp:person) range(pp:animal)) ObjectProperty(pp:is_pet_of inverseOf(pp:has_pet)) DataProperty(pp:service_number range(xsd:integer)) SubPropertyOf(pp:has_pet pp:likes)
11
Individuals
objects in the world belong to classes are related to other objects and to data values via properties
12
Example Individuals
Individual(pp:Tom type(owl:Thing)) Individual(pp:Dewey type(pp:duck)) Individual(pp:Rex type(pp:dog) value(pp:is_pet_of pp:Mick)) Individual(pp:Mick type(pp:male) value(pp:reads pp:Daily+Mirror) value(pp:drives pp:Q123+ABC)) Individual(pp:The42 type(pp:bus) value(pp:service_number "42"xsd:integer))
13
16
Class(pp:old+lady complete intersectionOf(pp:elderly pp:female pp:person)) Class(pp:old+lady partial intersectionOf( restriction(pp:has_pet allValuesFrom(pp:cat)) restriction(pp:has_pet someValuesFrom(pp:animal)))) Every old lady must have a pet cat. (Because she must have some pet and all her pets must be cats.)
17
Class(pp:cow partial pp:vegetarian) Class(pp:mad+cow complete intersectionOf(pp:cow restriction(pp:eats someValuesFrom(intersectionOf(pp:brain restriction(pp:part_of someValuesFrom pp:sheep)))))) There can be no mad cows. (Because cows, as vegetarians, dont eat anything that is a part of an animal.)
18
Individual(pp:Q123+ABC type(pp:white+thing) type(pp:van)) Individual(pp:Mick type(pp:male) value(pp:reads pp:Daily+Mirror) value(pp:drives pp:Q123+ABC)) Mick drives a white van, so he must be an adult (because all drivers are adults). As Mick is male, thus he is a white van man, so any paper he reads must be a tabloid, thus the Daily Mirror is a tabloid.
22
23