Ontologies : Practical Activities
Duration1h15 AI Banned
The Protégé environment
Protégé is a free and open source ontology editor that provides a framework for designing intelligent systems. It enables the design of knowledge-based systems in various fields such as e-commerce and biomedicine.
The following activities will familiarise you with this environment so that you can manipulate and even design ontologies.
Before you begin, you must download Protégé: Download Protégé
It is also important to note that Protégé uses Manchester syntax, particularly the operators listed in the following table:
| OWL property | Manchester syntax operator |
|---|---|
| owl:unionOf | or |
| owl:intersectionOf | and |
| owl:someValuesFrom | some |
| owl:allValuesFrom | only |
| owl:hasValue | value |
| owl:minCardinality | min |
| owl:maxCardinality | max |
| owl:cardinality | exactly |
1 - Pizza ontology
In this activity, we will use the Protégé software to import an ontology, explore it, use a reasoner to check its consistency, and customise the Protégé interface if necessary.
Launch Protégé and import the Pizza ontology. Simply click on Direct Import, then choose the second option to import from a document on the web. The URL for the Pizza ontology is usually provided in a default list. If not, simply enter the URL manually: http://protege.stanford.edu/ontologies/pizza/pizza.owl
The first step is to explore this ontology. You can consult the help available here: http://protegeproject.github.io/protege/getting-started/
You can also consult its XML document by following its URL.
Once the ontology has been imported:
- Browse the ontology’s classes and properties to find out about:
- classes
- class instances or individuals
- object properties
- data properties
- the domain and range of each property
- the characteristics of each property
- the restrictions on the properties
- Visualise the ontology graph. To do this, you will need to add the OntoGraph or OWLViZ tab to the interface.
- Use a classifier (reasoner) and understand the errors detected and what needs to be corrected. Identify the errors marked in red and understand the explanations provided for them.
- Add classes of pizza or other items and/or object properties and/or datatype properties and check whether you have added any inconsistencies detected by the classifier.
2 - Design a small ontology
The objective of this second activity is to design a small ontology comprising a few concepts. To do this, we will use an existing tutorial as a basis.
-
Follow the tutorial step by step Protected 5.2 - Creating a small ontology.
-
Once you have created your ontology, export it in RDF/XML format.
3 - Design a complex ontology
The objective of this activity is to design an ontology for describing an internship management system for your engineering school. The system must represent:
- Engineering students,
- Internship offers,
- Companies,
- Academic supervisors,
- Skills,
- Internship requirements,
- Credits and duration.
The goal is to model this domain formally using OWL in Protégé, while reusing the schema and foaf vocabularies when possible.
To this end, you will need to identify :
-
the classes of the domain,
-
the relationships between them (e.g., students are related to internships and skills).
-
the relevant restrictions :
- an internship requires at least 3 skills.
- a supervisor must not supervise more than 3 internships.
-
Is it possible to express this restriction : A student can only apply for internships that require at least two skills they possess.
Add individuals and check for the ontology consistency.