Note: we will not use ontology from previous classes during the following exercises (we will only check it using Pellet reasoner in OWL Reasoning - Reasoners section). There will be mini-examples for each of them to show particular ideas.
Class: bus_driver EquivalentTo: person that drives some bus Class: driver EquivalentTo: person that drives some vehicle Class: bus SubClassOf: vehicle
Hints:
Reasoner → start reasoner
) and observe the inferred class hierarchy.Individual: Daily_Mirror Types: owl:Thing Individual: Q123ABC Types: van, white_thing Individual: Mick Types: man Facts: reads Daily_Mirror, drives Q123ABC Class: white_van_man EquivalentTo: man that drives some (van and white_thing) SubClassOf: reads only tabloid
For those not familiar with UK culture, White Van Man is a stereotype used to describe a particular kind of driver. Wikipedia provides an entry with some additional information and references.
Hints:
Reasoner → Start reasoner
) and observe the inferred class hierarchy. Where is the white_van_man
? What conclusions have been drawn? Description Logics (DL) reasoners may be integrated with other tools – as in the case of Protege presented before – as well as run independently via various interfaces. Popular DL reasoners include: FaCT++, Pellet, HermiT, RacerPro and many others.
We will use the HermiT reasoner (you can also use Pellet reasoner; the link is at the top of this page).
java -jar HermiT.jar –help
pellet.sh help
(use pellet.bat
if you are using Windows)java -jar HermiT.jar -k <ontology>
where <ontology>
is:pizza.owl
ontology provided with HermiT in project/examples/ontologies/
directorypellet.sh consistency <ontology>
where the <ontology>
is:people+pets.owl
ontology provided with Pellet in examples/data/
directory java -jar HermiT.jar -cP <ontology>
pellet.sh classify <ontology>
These instructions are based on the The Family History Knowledge Base Tutorial1) by The University of Manchester, School of Computer Science.
Family-tree-0.owl
Sex
, Female
, Male
, Person
, Man
and Woman
classes.hasSex
property. Set domain and ranges on hasSex
(Person/Sex). Make it functional.Person
: hasSex some Sex
.plain-individuals.owl
file. Observe that none of them have any assertions on them (Active Ontology
tab → Imported ontologies
→ Direct imports
).Reasoner
menu in Protege (Reasoner → Start/Synchronize reasoner
), classify the ontology. What inferences are made?Family-tree-1.owl
. Check how Man
and Woman
classes are defined.individuals-1-parantage.owl
file.Family-tree-2.owl
. Victorian
class: Person and birthYear some integer[>=1837, <=1901]
<=
does not work, try: Person and (birthYear some xsd:integer[>=1837]) and not (birthYear some xsd:integer[>1901])
Family-tree-3.owl
. hasParent
called hasAncestor
,Family-tree-4.owl
. David_bright_1934
have?Family-tree-5.owl
.hasGrandParent
subProperty of hasAncestor
(inverse grandparentOf
).hasGrandMother/Father
+ domains and rangesFamily-tree-6.owl
.