IN5800 – Ontology Engineering

Leif Harald Karlsen

Ontology

Overview of ontology/conceptual schema use

  • Communicate knowledge in a precise way
  • Describe structure/meaning of data
  • Make knowledge independent/separate from code
  • Data integration
  • Saturation (inferring implicit knowledge)
  • Abstraction
  • Checking correctness (inconsitencies)

Where do Ontologies Come From?

  • Similar to data:
    • Made by people
    • Made by software
    • Made from contents of documents
  • However, ontologies mostly made by people (directly)
  • More similar to software than data

What is Ontology Engineering?

Ontology Engineering Process

  • Different types of people involved
    • Ontology expert: Knows logic and ontologies
    • Domain expert: Knows the domain
    • Data manager: Knows the organization’s data
  • Need to communicate and agree

Complexities in Ontology Engineering

  1. What to model?
  2. How to model?
  3. How to maintain the model?

Complexity 1: What to model?

Scoping

Competency Questions

  • A competency question is a question that the ontology should be able to answer
    • Which species hunt endangered species?
    • Which alien species live in marine habitats?
  • Shows the vocabulary the ontology needs to introduce
  • Also shows the relationships between the terms
  • A very useful tool for scoping
  • Also useful tool for communication between roles

Reuse

  • There are lots of existing ontologies
  • Possible to reuse all or parts of existing ontologies
  • Some languages, like OWL, have special support for reuse
    • import-statements
  • Artsdatabanken example (list of relevant ontologies)
  • Also exists libraries of modelling patterns

Standards

  • If no ontology to reuse exists, maybe there however exists:
    • Standardized vocabularies
    • Engineering standards
    • Taxonomies
    • Scientific classifications
    • Etc.
  • This will give you a skeleton to work with
  • Ensures correct foundation
  • Artsdatabanken example: Taxonomies
  • Aibel example: ASME

Foundational Assumptions (Ontological Commitments)

  • Need to decide what things exists
  • What are the topmost classes, i.e. how is reality categorized
  • What determines identity
  • Can quickly end up in trouble if different foundational assumptions are made in same ontology
  • Difficult to combine ontologies with different foundational assumptions

Upper Ontologies and Methodologies for Modelling

Complexity 2: How to model?

Classes vs. instances vs. properties

Classes (Manchester syntax):

# Ontology
Class: Mammal
    subClassOf: Animal
Class: Fish
    subClassOf: Animal
    
Class: Wolf
    subClassOf: Mammal and habitat some Forest
    subClassOf: Mammal and habitat only Forest
    
Class: Cod
    subClassOf: Fish and habitat some Sea 
    subClassOf: Fish and habitat only Sea 

# Data
Wolf(ulv123)
habitat(ulv123, loc98)
Cod(torsk456)
habitat(torsk456, loc39)

# Use:
# Inference: ulf123 a Mammal, loc98 a Forest, etc.
# Query: Query for all Mammals, Animals, etc. directly
# Cannot query for animals of same species (every animal gets type Animal
#   SELECT * WHERE { ?x a ?Species . ?y a ?Species . }

Individuals (Turtle syntax):

# Ontology
:wolf :inKingdom :mammal ;
    :hasHabitat :forest .

:cod :inKingdom :fish ;
    :hasHabitat :sea .

# Data
:ulv123 :hasSpecies :wolf ;
    :habitat :loc98 .
:torsk456 :hasSpecies :cod ;
    :habitat :loc39 .

# Use:
# Inference: None (but could add e.g. hasSpecies o hasHabitat subPropertyOf: hasHabitat
#    -> :ulv123 :hasHabitat :Forest
# Query: Cannot query for all Mammals, Animals, etc. directly (but indirectly with more complex wuery)
# Can query for animals of same species
#   SELECT * WHERE { ?x :hasSpecies ?species . ?y :hasSpecies ?species . }

Classes vs. individuals (cont.)

Decide how to model things “impossible” to model

Choosing Ontology Language/Fragment

Naming

Modularization

Patterns and Templates

  • Already covered earlier in the lectures (and in IN3060/IN4060)
  • However, an important point about OTTR templates:
    • Provides a natural form of modularization
    • Different roles are responsible for different things
    • Ontology expert: Makes foundational templates for logic, upper ontologies, etc.
    • Data expert: Makes templates matching organization’s data formats and needs
    • Domain expert: Makes instances to populate ontology

Complexity 3: How to Maintain Model?

Design of relational schemas

                            Country
                            
| country        | region   | 2023       | 2022       | 2021       |
|----------------|----------|------------|------------|------------|
| United States  | Americas | 26,854,599 | 22,996,100 | 23,315,081 |
| China          | Asia     | 19,373,586 | 17,734,063 | 17,734,131 |
| Japan          | Asia     | 4,409,738  | 4,937,422  | 4,940,878  |
| Germany        | Europe   | 4,308,854  | 4,223,116  | 4,259,935  |
| India          | Asia     | 3,736,882  | 3,173,398  | 3,201,471  |
| United Kingdom | Europe   | 3,158,938  | 3,186,860  | 3,131,378  |
| France         | Europe   | 2,923,489  | 2,937,473  | 2,957,880  |
| Italy          | Europe   | 2,169,745  | 2,107,703  | 2,107,703  |
| Canada         | Americas | 2,089,672  | 1,988,336  | 1,988,336  |
| Brazil         | Americas | 2,081,235  | 1,608,981  | 1,608,981  |


--

            Country

| country        | region   |
|----------------|----------|
| United States  | Americas |
| China          | Asia     |
| Japan          | Asia     |
| Germany        | Europe   |
| India          | Asia     |
| United Kingdom | Europe   |
| France         | Europe   |
| Italy          | Europe   |
| Canada         | Americas |
| Brazil         | Americas |

            GDP
            
| country        | year | GPD        |
|----------------|------|------------|
| United States  | 2023 | 26,854,599 |
| China          | 2023 | 19,373,586 |
| Japan          | 2023 | 4,409,738  |
| Germany        | 2023 | 4,308,854  |
| India          | 2023 | 3,736,882  |
| United Kingdom | 2023 | 3,158,938  |
| France         | 2023 | 2,923,489  |
| Italy          | 2023 | 2,169,745  |
| Canada         | 2023 | 2,089,672  |
| Brazil         | 2023 | 2,081,235  |
| United States  | 2022 | 22,996,100 |
| China          | 2022 | 17,734,063 |
| Japan          | 2022 | 4,937,422  |
| Germany        | 2022 | 4,223,116  |
| India          | 2022 | 3,173,398  |
| United Kingdom | 2022 | 3,186,860  |
| France         | 2022 | 2,937,473  |
| Italy          | 2022 | 2,107,703  |
| Canada         | 2022 | 1,988,336  |
| Brazil         | 2022 | 1,608,981  |
| United States  | 2021 | 23,315,081 |
| China          | 2021 | 17,734,131 |
| Japan          | 2021 | 4,940,878  |
| Germany        | 2021 | 4,259,935  |
| India          | 2021 | 3,201,471  |
| United Kingdom | 2021 | 3,131,378  |
| France         | 2021 | 2,957,880  |
| Italy          | 2021 | 2,107,703  |
| Canada         | 2021 | 1,988,336  |
| Brazil         | 2021 | 1,608,981  |