36
Tools for Ontology Engineering Martin G. Skjæveland, Leif Harald Karlsen, Daniel P. Lupp 1 / 11

Tools for Ontology Engineering - uio.no

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Tools for Ontology Engineering - uio.no

Tools for Ontology Engineering

Martin G. Skjæveland, Leif Harald Karlsen, Daniel P. Lupp

1 / 11

Page 2: Tools for Ontology Engineering - uio.no

Ontology Engineering

Discipline studying tools and methodologies for building and maintaining ontologies.

There are (at least) three main problems in ontology engineering:

1. Understanding the target domain, e.g., the domain of animals

2. Identifying relevant abstractions over the domain, e.g., “A panda is a mammal thateats only bamboo”

3. Formulating the abstractions in a formal language like description logics; e.g.:

Panda v Mammal u ∀ eats.Bamboo

2 / 11

Page 3: Tools for Ontology Engineering - uio.no

Ontology Engineering

Discipline studying tools and methodologies for building and maintaining ontologies.

There are (at least) three main problems in ontology engineering:

1. Understanding the target domain, e.g., the domain of animals

2. Identifying relevant abstractions over the domain, e.g., “A panda is a mammal thateats only bamboo”

3. Formulating the abstractions in a formal language like description logics; e.g.:

Panda v Mammal u ∀ eats.Bamboo

2 / 11

Page 4: Tools for Ontology Engineering - uio.no

Ontology Engineering

Discipline studying tools and methodologies for building and maintaining ontologies.

There are (at least) three main problems in ontology engineering:

1. Understanding the target domain, e.g., the domain of animals

2. Identifying relevant abstractions over the domain, e.g., “A panda is a mammal thateats only bamboo”

3. Formulating the abstractions in a formal language like description logics; e.g.:

Panda v Mammal u ∀ eats.Bamboo

2 / 11

Page 5: Tools for Ontology Engineering - uio.no

Ontology Engineering

Discipline studying tools and methodologies for building and maintaining ontologies.

There are (at least) three main problems in ontology engineering:

1. Understanding the target domain, e.g., the domain of animals

2. Identifying relevant abstractions over the domain, e.g., “A panda is a mammal thateats only bamboo”

3. Formulating the abstractions in a formal language like description logics; e.g.:

Panda v Mammal u ∀ eats.Bamboo

2 / 11

Page 6: Tools for Ontology Engineering - uio.no

Use case: Animals

Say we are tasked with creating an animal and plant ontology

• Add disjoint Animal and Plant subclasses of LivingThing

• Add disjoint Mammal and Bird subclasses of Animal

• Add disjoint Panda, Cat, Mouse, subclasses of Mammal

• Add disjoint Bamboo and Fruit subclasses of Plant

• Add eats role, with domain Animal, range LivingThing

• Add Carnivore, Herbivore, Omnivore subclasses to Animal

• Add that Carnivore eats only Animal

• Add that Herbivore eats only Plant

• Add that Omnivore eats some Plant and some Animal

• Reason!

3 / 11

Page 7: Tools for Ontology Engineering - uio.no

Use case: Animals

Say we are tasked with creating an animal and plant ontology

• Add disjoint Animal and Plant subclasses of LivingThing

• Add disjoint Mammal and Bird subclasses of Animal

• Add disjoint Panda, Cat, Mouse, subclasses of Mammal

• Add disjoint Bamboo and Fruit subclasses of Plant

• Add eats role, with domain Animal, range LivingThing

• Add Carnivore, Herbivore, Omnivore subclasses to Animal

• Add that Carnivore eats only Animal

• Add that Herbivore eats only Plant

• Add that Omnivore eats some Plant and some Animal

• Reason!3 / 11

Page 8: Tools for Ontology Engineering - uio.no

What was the problem?

• “Carnivore/Herbivore EquivalentTo eats only Animal/Plant” – not correct!

• By this definition, if something does not eat anything, it is a Carnivore, which resultsin:

∃eats.> v Animal (Domain of eats is Animal)

¬Animal v ∀eats.⊥ (Complement of Animal does not eat)

¬Animal v eats.⊥ v Carnivore v Animal (things that don’t eat are in Carnivore)

• This can only be true if Animal ≡ >.

• Cannot always simply translate what a domain expert says into logical axioms

• Need to really understand the domain and the consequences the axioms have

4 / 11

Page 9: Tools for Ontology Engineering - uio.no

What was the problem?

• “Carnivore/Herbivore EquivalentTo eats only Animal/Plant” – not correct!

• By this definition, if something does not eat anything, it is a Carnivore, which resultsin:

∃eats.> v Animal (Domain of eats is Animal)

¬Animal v ∀eats.⊥ (Complement of Animal does not eat)

¬Animal v eats.⊥ v Carnivore v Animal (things that don’t eat are in Carnivore)

• This can only be true if Animal ≡ >.

• Cannot always simply translate what a domain expert says into logical axioms

• Need to really understand the domain and the consequences the axioms have

4 / 11

Page 10: Tools for Ontology Engineering - uio.no

What was the problem?

• “Carnivore/Herbivore EquivalentTo eats only Animal/Plant” – not correct!

• By this definition, if something does not eat anything, it is a Carnivore, which resultsin:

∃eats.> v Animal (Domain of eats is Animal)

¬Animal v ∀eats.⊥ (Complement of Animal does not eat)

¬Animal v eats.⊥ v Carnivore v Animal (things that don’t eat are in Carnivore)

• This can only be true if Animal ≡ >.

• Cannot always simply translate what a domain expert says into logical axioms

• Need to really understand the domain and the consequences the axioms have

4 / 11

Page 11: Tools for Ontology Engineering - uio.no

Correct vs correct enough

• Lets say we now want to introduce gender into our model

• Should we let Animal ≡ Male t Female and Male u Female v ⊥?

• What about hermaphrodites1?

• Will it be correct if we just drop Male u Female v ⊥?

• Clown fish can change their sex during their life

• So for correctness we need to add a temporal component...

• Correctness can be difficult or even impossible to achieve

• (Particularly in a restricted language, e.g. OWL)

Should strive for “correct enough” for the particular application

1See https://en.wikipedia.org/wiki/Hermaphrodite5 / 11

Page 12: Tools for Ontology Engineering - uio.no

Correct vs correct enough

• Lets say we now want to introduce gender into our model

• Should we let Animal ≡ Male t Female and Male u Female v ⊥?

• What about hermaphrodites1?

• Will it be correct if we just drop Male u Female v ⊥?

• Clown fish can change their sex during their life

• So for correctness we need to add a temporal component...

• Correctness can be difficult or even impossible to achieve

• (Particularly in a restricted language, e.g. OWL)

Should strive for “correct enough” for the particular application

1See https://en.wikipedia.org/wiki/Hermaphrodite5 / 11

Page 13: Tools for Ontology Engineering - uio.no

Correct vs correct enough

• Lets say we now want to introduce gender into our model

• Should we let Animal ≡ Male t Female and Male u Female v ⊥?

• What about hermaphrodites1?

• Will it be correct if we just drop Male u Female v ⊥?

• Clown fish can change their sex during their life

• So for correctness we need to add a temporal component...

• Correctness can be difficult or even impossible to achieve

• (Particularly in a restricted language, e.g. OWL)

Should strive for “correct enough” for the particular application

1See https://en.wikipedia.org/wiki/Hermaphrodite5 / 11

Page 14: Tools for Ontology Engineering - uio.no

Correct vs correct enough

• Lets say we now want to introduce gender into our model

• Should we let Animal ≡ Male t Female and Male u Female v ⊥?

• What about hermaphrodites1?

• Will it be correct if we just drop Male u Female v ⊥?

• Clown fish can change their sex during their life

• So for correctness we need to add a temporal component...

• Correctness can be difficult or even impossible to achieve

• (Particularly in a restricted language, e.g. OWL)

Should strive for “correct enough” for the particular application

1See https://en.wikipedia.org/wiki/Hermaphrodite5 / 11

Page 15: Tools for Ontology Engineering - uio.no

Correct vs correct enough

• Lets say we now want to introduce gender into our model

• Should we let Animal ≡ Male t Female and Male u Female v ⊥?

• What about hermaphrodites1?

• Will it be correct if we just drop Male u Female v ⊥?

• Clown fish can change their sex during their life

• So for correctness we need to add a temporal component...

• Correctness can be difficult or even impossible to achieve

• (Particularly in a restricted language, e.g. OWL)

Should strive for “correct enough” for the particular application

1See https://en.wikipedia.org/wiki/Hermaphrodite5 / 11

Page 16: Tools for Ontology Engineering - uio.no

Correct vs correct enough

• Lets say we now want to introduce gender into our model

• Should we let Animal ≡ Male t Female and Male u Female v ⊥?

• What about hermaphrodites1?

• Will it be correct if we just drop Male u Female v ⊥?

• Clown fish can change their sex during their life

• So for correctness we need to add a temporal component...

• Correctness can be difficult or even impossible to achieve

• (Particularly in a restricted language, e.g. OWL)

Should strive for “correct enough” for the particular application

1See https://en.wikipedia.org/wiki/Hermaphrodite5 / 11

Page 17: Tools for Ontology Engineering - uio.no

Correct vs correct enough

• Lets say we now want to introduce gender into our model

• Should we let Animal ≡ Male t Female and Male u Female v ⊥?

• What about hermaphrodites1?

• Will it be correct if we just drop Male u Female v ⊥?

• Clown fish can change their sex during their life

• So for correctness we need to add a temporal component...

• Correctness can be difficult or even impossible to achieve

• (Particularly in a restricted language, e.g. OWL)

Should strive for “correct enough” for the particular application

1See https://en.wikipedia.org/wiki/Hermaphrodite5 / 11

Page 18: Tools for Ontology Engineering - uio.no

Correct vs correct enough

• Lets say we now want to introduce gender into our model

• Should we let Animal ≡ Male t Female and Male u Female v ⊥?

• What about hermaphrodites1?

• Will it be correct if we just drop Male u Female v ⊥?

• Clown fish can change their sex during their life

• So for correctness we need to add a temporal component...

• Correctness can be difficult or even impossible to achieve

• (Particularly in a restricted language, e.g. OWL)

Should strive for “correct enough” for the particular application

1See https://en.wikipedia.org/wiki/Hermaphrodite5 / 11

Page 19: Tools for Ontology Engineering - uio.no

Scale matters

• There are many species of animals!

• Over 1.9 million formally described2 species!

• Most interesting domains are large:

• Medicine: SNOMED CT3 contains more than 311,000 classes and 1,360,000relationships

• Bioinformatics: GeneOntology4 contains around 50,000 classes

• Engineering: Lots of different screws, nuts, bolts, materials, pipes

• Ontologies built by many people, over long period of time

• Difficult to stay consistent in how one models things!

2https://en.wikipedia.org/wiki/Species_description3http://www.snomed.org/snomed-ct/why-snomed-ct4http://geneontology.org/

6 / 11

Page 20: Tools for Ontology Engineering - uio.no

Scale matters

• There are many species of animals!

• Over 1.9 million formally described2 species!

• Most interesting domains are large:

• Medicine: SNOMED CT3 contains more than 311,000 classes and 1,360,000relationships

• Bioinformatics: GeneOntology4 contains around 50,000 classes

• Engineering: Lots of different screws, nuts, bolts, materials, pipes

• Ontologies built by many people, over long period of time

• Difficult to stay consistent in how one models things!

2https://en.wikipedia.org/wiki/Species_description3http://www.snomed.org/snomed-ct/why-snomed-ct4http://geneontology.org/

6 / 11

Page 21: Tools for Ontology Engineering - uio.no

Scale matters

• There are many species of animals!

• Over 1.9 million formally described2 species!

• Most interesting domains are large:

• Medicine: SNOMED CT3 contains more than 311,000 classes and 1,360,000relationships

• Bioinformatics: GeneOntology4 contains around 50,000 classes

• Engineering: Lots of different screws, nuts, bolts, materials, pipes

• Ontologies built by many people, over long period of time

• Difficult to stay consistent in how one models things!

2https://en.wikipedia.org/wiki/Species_description3http://www.snomed.org/snomed-ct/why-snomed-ct4http://geneontology.org/

6 / 11

Page 22: Tools for Ontology Engineering - uio.no

Scale matters

• There are many species of animals!

• Over 1.9 million formally described2 species!

• Most interesting domains are large:

• Medicine: SNOMED CT3 contains more than 311,000 classes and 1,360,000relationships

• Bioinformatics: GeneOntology4 contains around 50,000 classes

• Engineering: Lots of different screws, nuts, bolts, materials, pipes

• Ontologies built by many people, over long period of time

• Difficult to stay consistent in how one models things!

2https://en.wikipedia.org/wiki/Species_description3http://www.snomed.org/snomed-ct/why-snomed-ct4http://geneontology.org/

6 / 11

Page 23: Tools for Ontology Engineering - uio.no

Modelling with large ontologies

• Try to open up a medium sized ontology in Protégé

• E.g. The Plant Ontology5

• Imagine trying to update the modelling of the different “stages” in this ontology

• Now, imagine doing this on one of the large ontologies

• Ontologies, just like source code needs to be modularized and well documented

5http://www.obofoundry.org/ontology/po.html7 / 11

Page 24: Tools for Ontology Engineering - uio.no

Modelling with large ontologies

• Try to open up a medium sized ontology in Protégé

• E.g. The Plant Ontology5

• Imagine trying to update the modelling of the different “stages” in this ontology

• Now, imagine doing this on one of the large ontologies

• Ontologies, just like source code needs to be modularized and well documented

5http://www.obofoundry.org/ontology/po.html7 / 11

Page 25: Tools for Ontology Engineering - uio.no

Modelling with large ontologies

• Try to open up a medium sized ontology in Protégé

• E.g. The Plant Ontology5

• Imagine trying to update the modelling of the different “stages” in this ontology

• Now, imagine doing this on one of the large ontologies

• Ontologies, just like source code needs to be modularized and well documented

5http://www.obofoundry.org/ontology/po.html7 / 11

Page 26: Tools for Ontology Engineering - uio.no

Modelling with large ontologies

• Try to open up a medium sized ontology in Protégé

• E.g. The Plant Ontology5

• Imagine trying to update the modelling of the different “stages” in this ontology

• Now, imagine doing this on one of the large ontologies

• Ontologies, just like source code needs to be modularized and well documented

5http://www.obofoundry.org/ontology/po.html7 / 11

Page 27: Tools for Ontology Engineering - uio.no

Difficulties in Ontology Engineering: Construction

Requires communication between ontology experts and domain experts

to determine:

• What to model

• E.g. only animals, or also plants, habitats, weather, etc.?

• “A panda is an animal”, “A panda eats only bamboo”

• No unnecessary axioms cluttering the model

• How to model

• “Every mammal is either male or female”⇒ Mammal v Male t Female orMammal v ∃hasGender .{male, female}

• Depends on how it will be used, e.g.. consitency checks, querying, documentation

• Uniform modelling (all animals modeled with the same info)

8 / 11

Page 28: Tools for Ontology Engineering - uio.no

Difficulties in Ontology Engineering: Construction

Requires communication between ontology experts and domain experts to determine:

• What to model

• E.g. only animals, or also plants, habitats, weather, etc.?

• “A panda is an animal”, “A panda eats only bamboo”

• No unnecessary axioms cluttering the model

• How to model

• “Every mammal is either male or female”⇒ Mammal v Male t Female orMammal v ∃hasGender .{male, female}

• Depends on how it will be used, e.g.. consitency checks, querying, documentation

• Uniform modelling (all animals modeled with the same info)

8 / 11

Page 29: Tools for Ontology Engineering - uio.no

Difficulties in Ontology Engineering: Construction

Requires communication between ontology experts and domain experts to determine:

• What to model

• E.g. only animals, or also plants, habitats, weather, etc.?

• “A panda is an animal”, “A panda eats only bamboo”

• No unnecessary axioms cluttering the model

• How to model

• “Every mammal is either male or female”⇒ Mammal v Male t Female orMammal v ∃hasGender .{male, female}

• Depends on how it will be used, e.g.. consitency checks, querying, documentation

• Uniform modelling (all animals modeled with the same info)

8 / 11

Page 30: Tools for Ontology Engineering - uio.no

Difficulties in Ontology Engineering: Maintenance

• Debugging errors (inconsistencies, wrong modelling, etc.)

• E.g. our modelling error about carnivores, etc.

• Updating ontology to new use-cases

• E.g. might want to model dynamic knowledge (i.e. how animals’ behavior change overtime)

• Maintain readability of ontology

• E.g. navigation can be difficult in an ontology with thousands of classes

• Correct modularization, splitting ontology into reasonable pieces

• Keeping track of what is modeled, and how

9 / 11

Page 31: Tools for Ontology Engineering - uio.no

Difficulties in Ontology Engineering: Maintenance

• Debugging errors (inconsistencies, wrong modelling, etc.)

• E.g. our modelling error about carnivores, etc.

• Updating ontology to new use-cases

• E.g. might want to model dynamic knowledge (i.e. how animals’ behavior change overtime)

• Maintain readability of ontology

• E.g. navigation can be difficult in an ontology with thousands of classes

• Correct modularization, splitting ontology into reasonable pieces

• Keeping track of what is modeled, and how

9 / 11

Page 32: Tools for Ontology Engineering - uio.no

Difficulties in Ontology Engineering: Maintenance

• Debugging errors (inconsistencies, wrong modelling, etc.)

• E.g. our modelling error about carnivores, etc.

• Updating ontology to new use-cases

• E.g. might want to model dynamic knowledge (i.e. how animals’ behavior change overtime)

• Maintain readability of ontology

• E.g. navigation can be difficult in an ontology with thousands of classes

• Correct modularization, splitting ontology into reasonable pieces

• Keeping track of what is modeled, and how

9 / 11

Page 33: Tools for Ontology Engineering - uio.no

Tools for Pattern-based Ontology Engineering

Luckily, there are many tools to aid in our modelling:

• Constraint languages (SHACL, SPIN, ShEx)

• Ontology Design Patterns (ODP, COP, DROP)

• Mapping tools (R2RML, RML, D2RQ)

• Ontology Scripting Languages (Tawny OWL, OPPL)

• Templating frameworks (GDOL, OTTR)

(Note: more tools exist!)

10 / 11

Page 34: Tools for Ontology Engineering - uio.no

Tools for Pattern-based Ontology Engineering

Luckily, there are many tools to aid in our modelling:

• Constraint languages (SHACL, SPIN, ShEx)

• Ontology Design Patterns (ODP, COP, DROP)

• Mapping tools (R2RML, RML, D2RQ)

• Ontology Scripting Languages (Tawny OWL, OPPL)

• Templating frameworks (GDOL, OTTR)

(Note: more tools exist!)

10 / 11

Page 35: Tools for Ontology Engineering - uio.no

Finding the right tools

• What to model• How to model• Communicate with

users• Debugging• Updating• Readability

→ ? ←

• Constraint languages• Ontology Design

Patterns• Mapping tools• Ontology Scripting

Languages• Templating frameworks

This lecture series about templating frameworks, specifically OTTR.

11 / 11

Page 36: Tools for Ontology Engineering - uio.no

Finding the right tools

• What to model• How to model• Communicate with

users• Debugging• Updating• Readability

→ ? ←

• Constraint languages• Ontology Design

Patterns• Mapping tools• Ontology Scripting

Languages• Templating frameworks

This lecture series about templating frameworks, specifically OTTR.

11 / 11