courses:semint:lab_onto101

  • Last verification: 20220909
  • Tools required for this lab:

1. Let's start: WebProtégé and Ontology 101 tutorial

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.

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. We will also do this during next lab.

You can prototype an ontology for:

  • The Bold and the Beautiful / The Game of Thrones / other topic you have used during previous labs :-)
  • or Multimedia Library (e.g. books, movies, music CDs, etc) as in sample screenshots

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 (we will use it next time).

  1. Create an account at WebProtégé website.
  2. Create a new project and then load (open) it.
  3. Open the Build your first ontology tutorial. Skim sections 1 and 2.
  4. Leave it open and read appropriate sections while doing consecutive steps…
  5. Note: WebProtege Users Guide may be useful.

During this lab we will follow the Build your first ontology tutorial.
Note: each part should take approx. 10 minutes!

2. Determine the domain and scope

  1. Scope: Discuss in pairs and define the scope of your ontology. For example, your ontology may describe all GoT characters in a specified period of time (e.g., at the end of the first book) or all multimedia items that you own.
    1. You can adjust the scope later during the process.
    2. Write down the scope of the ontology in your notes.
  2. Competency questions: Think of and list the competency questions your ontology will help to answer. Exemplary competency questions may be:
    1. What are the other movies in the genre I watch most often?
    2. Who are the children of the one named “Kingslayer”?
    3. Did Brooke marry a member of the Forrester family and when?
      Write down the competency questions in your notes.

3. Consider reuse

  1. Search for existing ontologies related to the topic (max 10 minutes) (e.g. the simplest ontology that will be useful is FOAF for describing the names od Dublin Core for describing basic media metadata). 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).
  2. In your notes, list existing classes and properties you will use in your ontology (if any).

4. Enumerate important terms

  1. Write down 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).

5. Define classes and class hierarchy

  1. Let's start with ProjectSettingsNew Entity Settings. Here you can specify how URIs in your ontology will look like. Change IRI Prefix to your own name (e.g., https://your-name/game-of-thrones) and IRI Suffix to Supplied name.
    • This will be a prefix for all concepts/relations/individuals that we will define in our ontology.
    • This will not change the existing URIs (if you have created some concepts before this step)
  2. In WebProtege, choose the Classes tab and create a new class. E.g., it may by a Person, or Movie or Kingdom etc.
  3. Repeat it for other classes. Create approx. 10 classes.
  4. Use drag-and-drop mechanism od WebProtege to move classes around in the classes “tree” → create a hierarchy of terms.
  • NOTE: Multiple inheritance is acceptable. If the tool is not helpful, use rdfs:subClassOf as an additional property.

6. Define the properties of classes

  1. In Properties tab, create new properties as subclasses of owl:topObjectProperty and owl:topDataProperty.
    1. object properties link classes to classes
    2. data properties link classes to datatypes (e.g., strings, dates etc.)
  2. Specify the domain and range of the properties.

7. Create instances

  1. In Individuals tab, create a few instances (objects) of defined classes (e.g., Jaime Lannister – an individual of a class Person, House Lannister as an instance of a class Family etc.)
  2. Assert relations among the instances (e.g., Jaime Lannister belongsTo House Lannister)

8. Wrapping up

  1. Can your ontology answer the competency questions you defined? If necessary, adjust the questions and/or the ontology.
  2. More about creating classes: read Section 4 and Section 5 of the tutorial and correct mistakes in your ontology.
  3. Conventions and vocabulary: read Section 6 and:
    1. tune your naming conventions (use CamelCase, starting with a capital letter for class names and a small letter for properties),
    2. be consistent about suffixes in the classes' names.
  4. Download your ontology (we will use it during the next classes)
    1. From hamburger menu (on the right) select Download
  • courses/semint/lab_onto101.txt
  • Last modified: 2 years ago
  • by kkt