To jest stara wersja strony!
Introduction to ontologies
Last verification: | 20171029 |
Tools required for this lab: | – |
Before the lab
Lab instructions
Developing an ontology is a complex task and it is hardly possible to learn everything what is important on a single lab session.
This lab aims to get you familiar with the WebProtégé ontology editor and chosen ontology constructs. You are encouraged to continue developing and refining your ontology at home.
During this lab we will prototype ontology for Harley Davidson workshop database:
-
in our database we will have some catalogue information (your task is to choose some that will be useful: colour, size, etc.)
our database will also consist some info about customers (height, weight, etc.)
database will be the backend for visual customisation online tool (website were you can build up your ideal motorbike from available parts)
it is fictional workshop so feel free to select these properties that in your own opinion are important in a such company :)
WebProtégé is a lightweight online ontology editing tool. It supports a limited set of constructs of ontology languages such as RDFS and OWL. Full-fledged ontology editor is Protege Desktop.
-
Create a new project called: SemWeb2017-HarleyDavidson-Name
, where Name should be your name(s).
Load (open) your project.
2 Developing an ontology
An ontology is an artifact that describes certain domain (part of a world).
It consists of a set of concepts (classes), typically organised in a hierarchy, connected by various properties and having various attributes.
-
Leave it open and read appropriate sections while doing consecutive steps…
-
2.1 Determine the domain and scope
Scope: Discuss in pairs and define the scope of your ontology. For example, your ontology may describe the motorbikes in specific style (e.g. ones whose appearance is inspired by the fantasy novels) or a general structure of a database describing parts and people that can be spotted in the workshop.
You can adjust the scope later during the process.
![8-)](/lib/images/smileys/icon_cool.gif)
Write down the scope of the ontology in the report.
Competency questions: Think of and list the competency questions your ontology will help to answer. Exemplary competency questions (you can use them, of course) may be:
Will this part fit in my project? (e.g. it is too big / too small)
Will this design fit me? (e.g. handlebars are so high that I cannot reach them)
What parts I can add to my motorbike? (e.g. if I have something like
Behemoth Bike, My Little Pony drawings are probably not the best solution)
![8-)](/lib/images/smileys/icon_cool.gif)
Write down the competency questions in the report.
2.2 Consider reuse
Search for existing ontologies related to the topic (max 10-15minutes) (e.g., the simplest ontology that will be useful is FOAF for describing the name and mail of each customer). Although you may not know the syntax of ontology languages, they should be intuitive (remember, they are basically descriptions of classes and relations among them).
![8-)](/lib/images/smileys/icon_cool.gif)
Put in your report links to
two ontologies that you find useful / related to the topic. List classes and properties you will use in your ontology (if any).
2.3 Enumerate important terms
![8-)](/lib/images/smileys/icon_cool.gif)
Write down in the report important terms that you will use to build your ontology. They may be nouns, verbs and other parts of speech. They will help you to identify and define
classes,
datatype properties (typically, attributes of the classes) and
object properties (relations between classes).
2.4 Define classes and class hierarchy
In WebProtege, choose the
Classes
tab and create a new class. E.g., it may by a
Person
, or
Part
or
Style
etc.
![](/_media/pl:dydaktyka:semweb:wp-class.png?w=400&tok=47d3d9)
Repeat it for other classes. Create approx. 10-20 classes.
Use drag-and-drop mechanism od WebProtege to move classes around in the classes „tree” → create a hierarchy of terms.
2.5 Define the properties of classes
In
Properties
tab, create new properties as subclasses of
owl:topObjectProperty
and
owl:topDataProperty
.
![](/_media/pl:dydaktyka:semweb:wp-properties.png?w=400&tok=35cdc9)
object properties link classes to classes
data properties link classes to datatypes (e.g., strings, dates etc.)
Specify the domain and range of the properties. Do you see any limitations/problems? If so, write them in the report.
![8-)](/lib/images/smileys/icon_cool.gif)
2.6 Create instances
In Individuals
tab, create a few instances (objects) of defined classes (e.g., John Kowalski
- an individual of a class Person
, Behemoth Style
as an instance of a class Style
etc.)
Assert relations among the instances (e.g., John Kowalski
likes
Behemoth Style
)
2.7 Tune your ontology
More about creating classes: read
Section 4 and Section 5 of the tutorial and correct mistakes in your ontology.
Conventions and vocabulary: read
Section 6 and
tune your naming conventions (use CamelCase
, starting with a capital letter for class names and a small letter for properties).
be consistent about suffixes in the classes' names.
3 Wrapping up
Can your ontology answer the competency questions you defined? If necessary, adjust the questions and/or the ontology.
Set your „Sharing settings” in WebProtege so that at least the teacher (login: kkutt
) can access it.
![8-)](/lib/images/smileys/icon_cool.gif)
The report consists of a
pdf file and the ontology - put the identifier on your ontology in the report and make sure the ontology is accessible.
![8-)](/lib/images/smileys/icon_cool.gif)
Write a short reflection about the process of developing an ontology. What was intuitive, what was not? What was difficult? How would you improve the process when building your next ontology?
Control questions
If you want to know more
Lecture:
Software:
Reading: