CS414 The Semantic Web: Lab-lecture: OWL, Ontologies and Protégé

advertisement
CS414 The Semantic Web: Lab-lecture: OWL, Ontologies and Protégé
Session objectives:
 Familiarisation with Protégé
 Visualisation of class hierarchies
 Formalise simple concepts using natural language statements
 Practice of building a simple ontology
 Use of the reasoner in Protégé
Introduction
Over this lab we will use Protégé for examining Ontologies, creating simple class
hierarchies, and formalising statements in natural language.
You can use the Protégé tutorials:
-Getting started with Protégé:
http://protegewiki.stanford.edu/wiki/Protege4GettingStarted
Examining OWL ontologies with Protégé
Download the “pizza.owl” ontology from the course website, and open it in Protégé.
Examine the class hierarchy by opening nodes in the class browser (left pane):
Examine classes in more detail by looking at specific class descriptions:
What can we learn about AmericanHot pizza?
Also have a look at object properties:
Visualisation of class hierarchies
Select OntoGraf and click on the classes of your choice in the class browser to add
entities to the graph.
Click on the layout icons in the OntoGraf window to view the class hierarchy:
Building ontologies with Protégé
You can add new entities in the class browser by clicking on the “add subclass” or
“add sibling class” icons:
Problem 1. Create a department ontology in Protégé that allows you to formalize the
following statements:
1. “first-year modules are taught by professors”
2. “all academic staff members must teach at least one undergraduate module”
3. “a department must have at least 10 and at most 30 members”
4. “mathematics modules are taught by MZ”
5. “modules and staff members are disjoint”
6. “personAtUni are staff members and students”
7. “administrative staff are those staff members that are neither academic nor
technical support staff ”
8. “PhD students are not allowed to teach first-year modules”
9. “MZ teaches SW and MfC”
10. “Each professor teaches exactly two modules”
11. “Academic staff members are PTW, MZ and SM”
12. “Professors can only teach MSc modules”
13. “Each academic staff member is either a lecturer, or a senior lecturer, or a
reader, or a professor”
14. “Each module is taught by one person”
Problem 2. Create a new ontology in Protégé that allows you to formalize the
following statements:
a) Nobody who really appreciates Beethoven fails to keep silent when the
Moonlight Sonata is being played
b) Guinea pigs are hopelessly ignorant of music
c) No one who is hopelessly ignorant of music ever keeps silent when the
d) Moonlight Sonata is being played.
e) Therefore, guinea pigs never really appreciate Beethoven.
Using a reasoner in Protégé
Protégé can connect to several OWL reasoners.
Using Protégé refine your previous ontology and show that the following argument is
valid: that is, define suitable classes, properties, and individuals, and show that the
two classes guinea_pigs and appreciates_beethoven are disjoint. (Do this by
defining a subclass of both of them and using the reasoner to show that it is empty.)
You can say, for instance, that two classes are disjoint by adding the appropriate
axioms to the description of a class:
Once you have defined your ontology, select and start a reasoner and examine the
inferred class hierarchy (open its tab):
For example, if we define “something” as a subclass of two disjoint classes, the
reasoner will infer that the resulting class is empty (a subclass of the bottom concept
or owl:Nothing.)
Download