oops!: on-line ontology diagnosis by maria poveda

44
OOPS! (ONTOLOGY PITFALL SCANNER!): ON- LINE ONTOLOGY DIAGNOSIS María Poveda-Villalón Asunción Gómez-Pérez and Mari Carmen Suárez-Figueroa Ontology Engineering Group. Universidad Politécnica de Madrid. [email protected] Data Quality Tutorial – SEMANTICS 2016 12 th September This work has been partially supported by the Spanish project "4V: volumen, velocidad, variedad y validez en la gestión innovadora de datos” (TIN2013-46238-C4-2-R) and the European project “Ready4SmartCities - ICT Roadmap and Data Interoperability for Energy Systems in Smart Cities” (FP7-608711). OOPS! website: http://oops.linkeddata.es Twitter account: @OOPSoeg

Upload: semanticsconference

Post on 16-Apr-2017

132 views

Category:

Technology


0 download

TRANSCRIPT

OOPS! (ONTOLOGY PITFALL SCANNER!): ON-LINE ONTOLOGY DIAGNOSIS

María Poveda-VillalónAsunción Gómez-Pérez and Mari Carmen Suárez-Figueroa

Ontology Engineering Group. Universidad Politécnica de Madrid.

[email protected]

Data Quality Tutorial – SEMANTICS 201612th September

This work has been partially supported by the Spanish project "4V: volumen, velocidad, variedad y validez en la gestión innovadora de datos” (TIN2013-46238-C4-2-R) and the European project “Ready4SmartCities - ICT Roadmap and Data Interoperability for Energy Systems in Smart Cities” (FP7-608711).

OOPS! website: http://oops.linkeddata.esTwitter account: @OOPSoeg

OOPS!: on-line ontology diagnosis

License

• This work is licensed under the Creative CommonsAttribution – Non Commercial – Share Alike License

• You are free:• to Share — to copy, distribute and transmit the work• to Remix — to adapt the work

• Under the following conditions• Attribution — You must attribute the work by inserting

• “[source http://www.oeg-upm.net/]” at the footer of each reusedslide

• a credits slide stating: “OOPS! (OntOlogy Pitfall Scanner!): on-line ontology diagnosis” by María Poveda-Villalón, Mari Carmen Suárez-Figueroa and Asunción Gómez-Pérez ”

• Non-commercial• Share-Alike

2

OOPS!: on-line ontology diagnosis

Ontology engineering and ontology evaluation

• The correct application of methodologies benefits the ontology quality• No complete guaranty

3

Ontology evaluation (checking the technical qualityof an ontology against a frame of reference) is acrucial activity in ontology engineering projects

Ontology diagnosis: identifying parts of the ontology directly responsible for incorrectness and incompleteness

1996 1997 ... 2001 2002 2003 20041995 2005 2006 ... 2009 2010

Guide 101 XDEXtreme Ontology RapidOWL

Grüninger & Fox

On-To-Knowledge

METHON TOLOGY DILIGENT NeOn

O. Development Methodologies Ontology Development Lightweight Approaches

OOPS!: on-line ontology diagnosis

Introduction

4

Ontology Evaluation

Conceptual

Practical

Top level frameworks and definitions

Guidelines and methods

Tools

OOPS!: on-line ontology diagnosis

Top level frameworks and definitions

Guidelines and methods

Tools

Introduction

5

Ontology Evaluation

Conceptual

Practical

• Upper-level ontology engineers• Deep knowledge in formal logic

and philosophy

OOPS!: on-line ontology diagnosis

Introduction

6

Ontology Evaluation

• Ontology engineers• Knowledge in

ontological engineering

Conceptual

Practical

Top level frameworks and definitions

Guidelines and methods

Tools

• Upper-level ontology engineers• Deep knowledge in formal logic

and philosophy

OOPS!: on-line ontology diagnosis

Introduction

7

Ontology Evaluation

• Ontology engineers• Knowledge in

ontological engineering

Conceptual

Practical

• Upper-level ontology engineers• Deep knowledge in formal logic

and philosophyTop level frameworks and definitions

Guidelines and methods

Tools

• Ontology developers• Domain experts

Target audience

OOPS!: on-line ontology diagnosis

Table of Contents

• Introduction

• Approach

• Pitfall catalogue

• OOPS!

• Future lines of work

8

OOPS!: on-line ontology diagnosis

Iterative process

9

14 piftalls

Manual inspection

Classification: Ontology Design Patterns

2009

OO

PS!

Pitfa

ll or

igin

Cata

logu

e

1st

Compilation

Phas

e

OOPS!: on-line ontology diagnosis

Manual inspection

Literature review

24 piftalls

Classification: aspects and errors in hierarchies

20102nd

14 piftalls

Manual inspection

Classification: Ontology Design Patterns

2009

OO

PS!

Pitfa

ll or

igin

Cata

logu

e

1st

ExtensionCompilation

Phas

e

Iterative process

10

OOPS!: on-line ontology diagnosis

Manual inspection

Literature review

24 piftalls

Classification: aspects and errors in hierarchies

20102nd

14 piftalls

Manual inspection

Classification: Ontology Design Patterns

2009

OO

PS!

Pitfa

ll or

igin

Cata

logu

e

1st

Manual inspection

Literature review

Web User Interface

29 piftalls

Classification: dimensions in tools

2012

21 pitfalls detected

3rd

ExtensionCompilation Implementation

Phas

e

Iterative process

11

OOPS!: on-line ontology diagnosis

Manual inspection

Literature review

24 piftalls

Classification: aspects and errors in hierarchies

20102nd

14 piftalls

Manual inspection

Classification: Ontology Design Patterns

2009

OO

PS!

Pitfa

ll or

igin

Cata

logu

e

1st

Manual inspection

Literature review

Web User Interface

29 piftalls

Classification: dimensions in tools

2012

21 pitfalls detected

3rd

Manual inspection

Literature review

Collaborations

Web User Interface

Web Service

40 piftalls

Classification: aspects and importance levels

2014

32 pitfalls detected

ExtensionCompilation Implementation Linked Data ext.

4th

Phas

e

Iterative process

12

OOPS!: on-line ontology diagnosis

Manual inspection

Literature review

Collaborations

Web User Interface

Web Service

41 piftalls

Classification: aspects and importance levels

2015

33 pitfalls detected

Quality model

Repair suggestions

5th

Manual inspection

Literature review

24 piftalls

Classification: aspects and errors in hierarchies

20102nd

14 piftalls

Manual inspection

Classification: Ontology Design Patterns

2009

OO

PS!

Pitfa

ll or

igin

Cata

logu

e

1st

Manual inspection

Literature review

Web User Interface

29 piftalls

Classification: dimensions in tools

2012

21 pitfalls detected

3rd

Manual inspection

Literature review

Collaborations

Web User Interface

Web Service

40 piftalls

Classification: aspects and importance levels

2014

32 pitfalls detected

RefinementExtensionCompilation Implementation Linked Data ext.

4th

Phas

e

Iterative process

13

OOPS!: on-line ontology diagnosis

Table of Contents

• Introduction

• Approach

• Pitfall catalogue

• OOPS!

• Future lines of work

14

OOPS!: on-line ontology diagnosis

Disclaimer

• Pitfalls could represent errors

• Pitfalls could lead to errors

• Pitfalls are not always errors depending on:o modelling decisions taken by the team of developers

o ontology requirements previously set

o application context of the ontology

o the domain of the ontology

15

OOPS!: on-line ontology diagnosis

List of 41 pitfalls

16

P01. Creating polysemous elementsP02. Creating synonyms as classesP03. Creating the relationship “is” instead of using

“rdfs:subClassOf”, “rdf:type” or “owl:sameAs”P04. Creating unconnected ontology elementsP05. Defining wrong inverse relationshipsP06. Including cycles in a class hierarchyP07. Merging different concepts in the same classP08. Missing annotationsP09. Missing domain informationP10. Missing disjointnessP11. Missing domain or range in propertiesP12. Equivalent properties not explicitly declaredP13. Inverse relationships not explicitly declaredP14. Misusing “owl:allValuesFrom”P15. Using “some not” in place of “not some”P16. Using a primitive class in place of a defined oneP17. Overspecializing a hierarchyP18. Overspecializing the domain or rangeP19. Defining multiple domains or ranges in propertiesP20. Misusing ontology annotationsP21. Using a miscellaneous class

P22. Using different naming conventions in the ontologyP23. Duplicating a datatype already provided by the

implementation languageP24. Using recursive definitionsP25. Defining a relationship as inverse to itselfP26. Defining inverse relationships for a symmetric oneP27. Defining wrong equivalent propertiesP28. Defining wrong symmetric relationshipsP29. Defining wrong transitive relationshipsP30. Equivalent classes not explicitly declaredP31. Defining wrong equivalent classesP32. Several classes with the same labelP33. Creating a property chain with just one property P34. Untyped classP35. Untyped propertyP36. URI contains file extensionP37. Ontology not available on the WebP38. No OWL ontology declarationP39. Ambiguous namespaceP40. Namespace hijackingP41. No license declared

OOPS!: on-line ontology diagnosis

Pitfall template

Pitfall template

17

Title Code and title of the pitfall Importance level {Critical | Important | Minor}

Aspects Ontology evaluation aspects related to the pitfall Affects to

{Ontology | [Classes,Object properties, Datatypeproperties]}

Description

Detailed explanation of what the pitfall consists in. This field might contain references to other approaches.

Example

Graphical representation Natural language description

UML_Ont profileOWL source

Natural language explanation of the graphical example or OWL code.

How to solve it

Description of the actions to be taken by ontology engineers in order to solve the described pitfall.

References* Pointers to related bibliographical references or links to URLs.

* optional

Process details

Process details

OOPS!: on-line ontology diagnosis

Assigning importance level

§ Survey to the Semantic Web community§ For 35 pitfalls (from that point level assigned during description)§ Participants were asked to mark each pitfall as:

o Critical o Important o Minor o Not a problem (additional)

§ 54 answers:o 28 experts o 22 medium confidence o 4 low confidence

18

According to the negative consequences of each pitfall in the ontology

OOPS!: on-line ontology diagnosis

Critical (1)P01. Creating polysemous elementsP03. Creating the relationship “is” instead of using ''rdfs:subClassOf'', ''rdf:type'' or ''owl:sameAs''P05. Defining wrong inverse relationshipsP06. Including cycles in a class hierarchyP14. Misusing ''owl:allValuesFrom''P15. Using “some not” in place of “not some”P16. Using a primitive class in place of a defined oneP19. Defining multiple domains or ranges in propertiesP27. Defining wrong equivalent propertiesP28. Defining wrong symmetric relationshipsP29. Defining wrong transitive relationshipsP31. Defining wrong equivalent classesP37. Ontology not available on the WebP39. Ambiguous namespace P40. Namespace hijacking

Important (2)P10. Missing disjointnessP11. Missing domain or range in propertiesP12. Equivalent properties not explicitly declaredP17. Overspecializing a hierarchy P18. Overspecializing the domain or rangeP23. Duplicating a datatype already provided by the

implementation languageP24. Using recursive definitionsP25. Defining a relationship as inverse to itselfP26. Defining inverse relationships for a symmetric oneP30. Equivalent classes not explicitly declaredP34. Untyped classP35. Untyped propertyP38. No OWL ontology declarationP41. No license declared

Minor (3)P02. Creating synonyms as classesP04. Creating unconnected ontology elementsP07. Merging different concepts in the same classP08. Missing annotationsP09. Missing domain informationP13. Inverse relationships not explicitly declaredP20. Misusing ontology annotationsP21. Using a miscellaneous classP22. Using different naming conventions in the ontologyP32. Several classes with the same labelP33. Creating a property chain with just one propertyP36. URI contains file extension

Pitfall classification by importance level

19

Phase 2

Phase 1survey

Phase 1survey

Phase 2

Phase 1survey

Phase 2

OOPS!: on-line ontology diagnosis 20

Classifying by ontology evaluation aspects

Structural Dimension

Usability-profiling Dimension

Functional Dimension

Ontology Understanding

Ontology Clarity

Ontology Metadata

Modeling Decisions

Requirement Completeness

Wrong Inference

No Inference

Real World Modelling or Common Sense

Structural Dimension

Functional Dimension

Ontology Language

Application Context

LegendAspectDimension Critical pitfall Important pitfall Minor pitfall * Pitfall appears twice

P05. Defining wrong inverse relationships

P19. Defining multiple domains or ranges in properties

P06. Including cycles in a class hierarchy P15. Using “some not” in place of “not some”P18. Overspecializing the domain or range

P27. Defining wrong equivalent properties P28. Defining wrong symmetric relationships P29. Defining wrong transitive relationshipsP31. Defining wrong equivalent classes

P01. Creating polysemous elements *

OOPS!: on-line ontology diagnosis 21

Classifying by ontology evaluation aspects

Structural Dimension

Usability-profiling Dimension

Functional Dimension

Ontology Understanding

Ontology Clarity

Ontology Metadata

Modeling Decisions

Requirement Completeness

Wrong Inference

No Inference

Real World Modelling or Common Sense

Structural Dimension

Functional Dimension

Ontology Language

Application Context

LegendAspectDimension Critical pitfall Important pitfall Minor pitfall * Pitfall appears twice

P05. Defining wrong inverse relationships

P19. Defining multiple domains or ranges in properties

P06. Including cycles in a class hierarchy P15. Using “some not” in place of “not some”P18. Overspecializing the domain or range

P27. Defining wrong equivalent properties P28. Defining wrong symmetric relationships P29. Defining wrong transitive relationshipsP31. Defining wrong equivalent classes

P01. Creating polysemous elements *

P13. Inverse relationships not explicitly declared

P11. Missing domain or range in properties P12. Equivalent properties not explicitly declared

OOPS!: on-line ontology diagnosis 22

Classifying by ontology evaluation aspects

P05. Defining wrong inverse relationships

P13. Inverse relationships not explicitly declared

P19. Defining multiple domains or ranges in properties

P24. Using recursive definitions

P09. Missing domain information *

P07. Merging different concepts in the same class

P02. Creating synonyms as classes

P20. Misusing ontology annotations

P01. Creating polysemous elements *

P17. Overspecializing a hierarchy

P03. Creating the relationship “is” instead of using “rdfs:subClassOf”, “rdf:type” or “owl:sameAs”

P11. Missing domain or range in properties

P21. Using a miscellaneous class

P12. Equivalent properties not explicitly declared

P23. Duplicating a datatype already provided by the implementation language

P04. Creating unconnected ontology elements

P06. Including cycles in a class hierarchy

P08. Missing annotations

P10. Missing disjointness (2)

P14. Misusing “allValuesFrom” P15. Using “some not” in place of “not some”

P16. Using a primitive class in place of a defined one

P18. Overspecializing the domain or range

Ontology Understanding

Modeling Decisions

Requirement Completeness

Wrong Inference

No Inference

Real World Modelling or Common Sense

Ontology Clarity

P22. Using different naming conventions in the ontology

Structural Dimension

Usability-profiling Dimension

Functional Dimension

P25. Defining a relationship as inverse to itself P26. Defining inverse relationships for a symmetric one

P27. Defining wrong equivalent properties P28. Defining wrong symmetric relationships P29. Defining wrong transitive relationships

P30. Equivalent classes not explicitly declared

P31. Defining wrong equivalent classes

P32. Several classes with the same label

P33. Creating a property chain with just one property

Ontology Language

P34. Untyped class P35. Untyped property

P36. URI contains file extension

Application Context

P37. Ontology not available on the Web *

P38. No OWL ontology declaration *

P39. Ambiguous namespace P40. Namespace hijacking

P41. No license declared

Ontology Metadata

P01. Creating polysemous elements *

P38. No OWL ontology declaration *

P37. Ontology not available on the Web *

LegendAspectDimension Critical pitfall Important pitfall Minor pitfall * Pitfall appears twice

OOPS!: on-line ontology diagnosis

Detection method template

Detection method template

23

Code Code of the methodPitfall cardinality {1 |N} Method

addresses{Ontology | [Classes, Object properties, Datatype properties]}

Technique{[Structural pattern matching, Linguistic analysis, Specific characteristic search]}

Pitfallaffects to

{Ontology | [Classes, Object properties, Datatype properties]}

Description

General explanation of what the method consists in based on the pitfall to be detected.Limitations*

Corner cases or well-known exceptions where the pitfalls are not currently detected.

Patterns

Graphical representation Natural language description

UML_Ont profileOWL source Natural language explanation of the pattern.

External resources used*Pointers to external libraries, systems or resources used within the methodimplementation.

* optional

From pitfall

template

OOPS!: on-line ontology diagnosis

Pitfalls and methods: example P25

24

P25. Defining a relationship as inverse to itself

Title P25. Defining a relationship as inverse to itselfImportancelevel

Important

Aspects Modelling decisions Affects to Object propertiesDescription

A relationship is defined as inverse of itself. In this case, this relationship could have been defined asowl:SymmetricProperty instead.

ExamplesGraphical representation and/or OWL code Natural language description

<<owl:inverseOf>>

<<owl:ObjectProperty>> hasBorderWith

The graphical example shows the object property“hasBorderWith”, which has been defined as inverseof itself by means of the primitive owl:inverseOf.

How to solve itOne should check whether the object property defined as inverse of itself satisfies the following condi-tion: every time the object property holds between the individuals “a” and “b” it also holds between“b” and “a”. If the object property does fulfil the condition, it should be defined as symmetric (usingowl:SymmetricProperty) and the owl:inverseOf statement should be deleted.

While the situation described in this pitfall will not lead to any reasoning problem and it could beconsidered a workaround to avoid increasing the ontology expressivity, it is more accurate to define theobject property as symmetric (using owl:SymmetricProperty) instead of as inverse to itself.

Table 6: P25. Defining a relationship as inverse to itself

Code M1-P25. Detecting relationships inverse to themselvesPitfallcardinality

N Method addresses Object properties

Technique Structural pattern matching Pitfall affects to Object propertiesDescription

This method iterates over the list of object properties included in the ontology.If a given object property acts at the same time as subject and object in an owl:inverseOf statement (patternA), then a pitfall is flagged.

PatternsGraphical representation and/or OWL code Natural language description

Pattern A:

<<owl:inverseOf>>

<<owl:ObjectProperty>> objectPropertyS

The graphical pattern shows an object property thathas an owl:inverseOf axiom whose target objectproperty is the same object property.

Table 7: Detection method proposed for P25

8

OOPS!: on-line ontology diagnosis

P25 descriptionTitle P25. Defining a relationship as inverse to itself

Importancelevel

Important

Aspects Modelling decisions Affects to Object propertiesDescription

A relationship is defined as inverse of itself. In this case, this relationship could have been defined asowl:SymmetricProperty instead.

ExamplesGraphical representation and/or OWL code Natural language description

<<owl:inverseOf>>

<<owl:ObjectProperty>> hasBorderWith

The graphical example shows the object property“hasBorderWith”, which has been defined as inverseof itself by means of the primitive owl:inverseOf.

How to solve itOne should check whether the object property defined as inverse of itself satisfies the following condi-tion: every time the object property holds between the individuals “a” and “b” it also holds between“b” and “a”. If the object property does fulfil the condition, it should be defined as symmetric (usingowl:SymmetricProperty) and the owl:inverseOf statement should be deleted.

While the situation described in this pitfall will not lead to any reasoning problem and it could beconsidered a workaround to avoid increasing the ontology expressivity, it is more accurate to define theobject property as symmetric (using owl:SymmetricProperty) instead of as inverse to itself.

Table 6: P25. Defining a relationship as inverse to itself

Code M1-P25. Detecting relationships inverse to themselvesPitfallcardinality

N Method addresses Object properties

Technique Structural pattern matching Pitfall affects to Object propertiesDescription

This method iterates over the list of object properties included in the ontology.If a given object property acts at the same time as subject and object in an owl:inverseOf statement (patternA), then a pitfall is flagged.

PatternsGraphical representation and/or OWL code Natural language description

Pattern A:

<<owl:inverseOf>>

<<owl:ObjectProperty>> objectPropertyS

The graphical pattern shows an object property thathas an owl:inverseOf axiom whose target objectproperty is the same object property.

Table 7: Detection method proposed for P25

8

Pitfalls and methods: example P25

25

P25. Defining a relationship as inverse to itselfTitle P25. Defining a relationship as inverse to itselfImportancelevel

Important

Aspects Modelling decisions Affects to Object propertiesDescription

A relationship is defined as inverse of itself. In this case, this relationship could have been defined asowl:SymmetricProperty instead.

ExamplesGraphical representation and/or OWL code Natural language description

<<owl:inverseOf>>

<<owl:ObjectProperty>> hasBorderWith

The graphical example shows the object property“hasBorderWith”, which has been defined as inverseof itself by means of the primitive owl:inverseOf.

How to solve itOne should check whether the object property defined as inverse of itself satisfies the following condi-tion: every time the object property holds between the individuals “a” and “b” it also holds between“b” and “a”. If the object property does fulfil the condition, it should be defined as symmetric (usingowl:SymmetricProperty) and the owl:inverseOf statement should be deleted.

While the situation described in this pitfall will not lead to any reasoning problem and it could beconsidered a workaround to avoid increasing the ontology expressivity, it is more accurate to define theobject property as symmetric (using owl:SymmetricProperty) instead of as inverse to itself.

Table 6: P25. Defining a relationship as inverse to itself

Code M1-P25. Detecting relationships inverse to themselvesPitfallcardinality

N Method addresses Object properties

Technique Structural pattern matching Pitfall affects to Object propertiesDescription

This method iterates over the list of object properties included in the ontology.If a given object property acts at the same time as subject and object in an owl:inverseOf statement (patternA), then a pitfall is flagged.

PatternsGraphical representation and/or OWL code Natural language description

Pattern A:

<<owl:inverseOf>>

<<owl:ObjectProperty>> objectPropertyS

The graphical pattern shows an object property thathas an owl:inverseOf axiom whose target objectproperty is the same object property.

Table 7: Detection method proposed for P25

8

Title P25. Defining a relationship as inverse to itselfImportancelevel

Important

Aspects Modelling decisions Affects to Object propertiesDescription

A relationship is defined as inverse of itself. In this case, this relationship could have been defined asowl:SymmetricProperty instead.

ExamplesGraphical representation and/or OWL code Natural language description

<<owl:inverseOf>>

<<owl:ObjectProperty>> hasBorderWith

The graphical example shows the object property“hasBorderWith”, which has been defined as inverseof itself by means of the primitive owl:inverseOf.

How to solve itOne should check whether the object property defined as inverse of itself satisfies the following condi-tion: every time the object property holds between the individuals “a” and “b” it also holds between“b” and “a”. If the object property does fulfil the condition, it should be defined as symmetric (usingowl:SymmetricProperty) and the owl:inverseOf statement should be deleted.

While the situation described in this pitfall will not lead to any reasoning problem and it could beconsidered a workaround to avoid increasing the ontology expressivity, it is more accurate to define theobject property as symmetric (using owl:SymmetricProperty) instead of as inverse to itself.

Table 6: P25. Defining a relationship as inverse to itself

Code M1-P25. Detecting relationships inverse to themselvesPitfallcardinality

N Method addresses Object properties

Technique Structural pattern matching Pitfall affects to Object propertiesDescription

This method iterates over the list of object properties included in the ontology.If a given object property acts at the same time as subject and object in an owl:inverseOf statement (patternA), then a pitfall is flagged.

PatternsGraphical representation and/or OWL code Natural language description

Pattern A:

<<owl:inverseOf>>

<<owl:ObjectProperty>> objectPropertyS

The graphical pattern shows an object property thathas an owl:inverseOf axiom whose target objectproperty is the same object property.

Table 7: Detection method proposed for P25

8

Title P25. Defining a relationship as inverse to itselfImportancelevel

Important

Aspects Modelling decisions Affects to Object propertiesDescription

A relationship is defined as inverse of itself. In this case, this relationship could have been defined asowl:SymmetricProperty instead.

ExamplesGraphical representation and/or OWL code Natural language description

<<owl:inverseOf>>

<<owl:ObjectProperty>> hasBorderWith

The graphical example shows the object property“hasBorderWith”, which has been defined as inverseof itself by means of the primitive owl:inverseOf.

How to solve itOne should check whether the object property defined as inverse of itself satisfies the following condi-tion: every time the object property holds between the individuals “a” and “b” it also holds between“b” and “a”. If the object property does fulfil the condition, it should be defined as symmetric (usingowl:SymmetricProperty) and the owl:inverseOf statement should be deleted.

While the situation described in this pitfall will not lead to any reasoning problem and it could beconsidered a workaround to avoid increasing the ontology expressivity, it is more accurate to define theobject property as symmetric (using owl:SymmetricProperty) instead of as inverse to itself.

Table 6: P25. Defining a relationship as inverse to itself

Code M1-P25. Detecting relationships inverse to themselvesPitfallcardinality

N Method addresses Object properties

Technique Structural pattern matching Pitfall affects to Object propertiesDescription

This method iterates over the list of object properties included in the ontology.If a given object property acts at the same time as subject and object in an owl:inverseOf statement (patternA), then a pitfall is flagged.

PatternsGraphical representation and/or OWL code Natural language description

Pattern A:

<<owl:inverseOf>>

<<owl:ObjectProperty>> objectPropertyS

The graphical pattern shows an object property thathas an owl:inverseOf axiom whose target objectproperty is the same object property.

Table 7: Detection method proposed for P25

8

OOPS!: on-line ontology diagnosis

Pitfalls and methods: example P25

26

M1-P25. Detecting relationships inverse to themselvesP25 description

Title P25. Defining a relationship as inverse to itselfImportancelevel

Important

Aspects Modelling decisions Affects to Object propertiesDescription

A relationship is defined as inverse of itself. In this case, this relationship could have been defined asowl:SymmetricProperty instead.

ExamplesGraphical representation and/or OWL code Natural language description

<<owl:inverseOf>>

<<owl:ObjectProperty>> hasBorderWith

The graphical example shows the object property“hasBorderWith”, which has been defined as inverseof itself by means of the primitive owl:inverseOf.

How to solve itOne should check whether the object property defined as inverse of itself satisfies the following condi-tion: every time the object property holds between the individuals “a” and “b” it also holds between“b” and “a”. If the object property does fulfil the condition, it should be defined as symmetric (usingowl:SymmetricProperty) and the owl:inverseOf statement should be deleted.

While the situation described in this pitfall will not lead to any reasoning problem and it could beconsidered a workaround to avoid increasing the ontology expressivity, it is more accurate to define theobject property as symmetric (using owl:SymmetricProperty) instead of as inverse to itself.

Table 6: P25. Defining a relationship as inverse to itself

Code M1-P25. Detecting relationships inverse to themselvesPitfallcardinality

N Method addresses Object properties

Technique Structural pattern matching Pitfall affects to Object propertiesDescription

This method iterates over the list of object properties included in the ontology.If a given object property acts at the same time as subject and object in an owl:inverseOf statement (patternA), then a pitfall is flagged.

PatternsGraphical representation and/or OWL code Natural language description

Pattern A:

<<owl:inverseOf>>

<<owl:ObjectProperty>> objectPropertyS

The graphical pattern shows an object property thathas an owl:inverseOf axiom whose target objectproperty is the same object property.

Table 7: Detection method proposed for P25

8

Title P25. Defining a relationship as inverse to itselfImportancelevel

Important

Aspects Modelling decisions Affects to Object propertiesDescription

A relationship is defined as inverse of itself. In this case, this relationship could have been defined asowl:SymmetricProperty instead.

ExamplesGraphical representation and/or OWL code Natural language description

<<owl:inverseOf>>

<<owl:ObjectProperty>> hasBorderWith

The graphical example shows the object property“hasBorderWith”, which has been defined as inverseof itself by means of the primitive owl:inverseOf.

How to solve itOne should check whether the object property defined as inverse of itself satisfies the following condi-tion: every time the object property holds between the individuals “a” and “b” it also holds between“b” and “a”. If the object property does fulfil the condition, it should be defined as symmetric (usingowl:SymmetricProperty) and the owl:inverseOf statement should be deleted.

While the situation described in this pitfall will not lead to any reasoning problem and it could beconsidered a workaround to avoid increasing the ontology expressivity, it is more accurate to define theobject property as symmetric (using owl:SymmetricProperty) instead of as inverse to itself.

Table 6: P25. Defining a relationship as inverse to itself

Code M1-P25. Detecting relationships inverse to themselvesPitfallcardinality

N Method addresses Object properties

Technique Structural pattern matching Pitfall affects to Object propertiesDescription

This method iterates over the list of object properties included in the ontology.If a given object property acts at the same time as subject and object in an owl:inverseOf statement (patternA), then a pitfall is flagged.

PatternsGraphical representation and/or OWL code Natural language description

Pattern A:

<<owl:inverseOf>>

<<owl:ObjectProperty>> objectPropertyS

The graphical pattern shows an object property thathas an owl:inverseOf axiom whose target objectproperty is the same object property.

Table 7: Detection method proposed for P25

8

OOPS!: on-line ontology diagnosis

Pitfalls and methods: example P19

27

P19. Defining multiple domains or ranges in propertiesTitle

P19. Defining multiple domains or ranges in proper-ties

Importancelevel

Critical

Aspects Wrong inference Affects toObject propertiesDatatype properties

DescriptionThe domain or range (or both) of a property (relationships and attributes) is defined by stating more thanone rdfs:domain or rdfs:range statements. In OWL multiple rdfs:domain or rdfs:range axioms are allowed,but they are interpreted as conjunction, being, therefore, equivalent to the construct owl:intersectionOf.This pitfall is related to the common error that appears when defining domains and ranges described in [2].

ExamplesGraphical representation and/or OWL code Natural language description

Event

Nation

<<owl:ObjectProperty>> takesPlaceIn

<<rdfs:domain>>

<<rdfs:range>>

City

<<rdfs:range>>

The graphical example shows an object property,“takesPlacesIn”, whose domain is the class “Event”and whose range is defined as “City” and as “Na-tion”. As the range of the relationship is interpretedas an intersection, whenever an individual appears asobject in such relationship, it will be classified bothas instance of “City” and “Nation”. This situationis probably not intended by the developer, since theintersection of “City” and “Nation” is the empty set.

How to solve itIf there is more than one rdfs:domain or rdfs:range statements defined for a given object or datatypeproperty, check:

For domains:

(a) For each object or datatype property with multiple domains in the ontology, we recommend answeringthe following question “Does every individual in the domain of the given property necessarily belongto each and every one of the intersected classes?”. If the answer is “no”, developers should (a) join theclasses that appear in the different domain declarations by the “or” operator (i.e., owl:unionOf) and setthis union of classes as the domain of the property and (b) remove the initial rdfs:domain declarations.

For ranges:

(a) For each object property with multiple ranges in the ontology, we recommend answering the followingquestion “Does every individual in the range of the given object property necessarily belong to each andevery one of the intersected classes?”. If the answer is “no”, developers should (a) join the classes thatappear in the different range declarations by the “or” operator (i.e., owl:unionOf) and set this union ofclasses as the range of the property and (b) remove the initial rdfs:range declarations.

(b) For each datatype property with multiple domains in the ontology, we recommend including at mostone datatype as range. We recommend taking into account the built-in datatype hierarchy defined in[1] to select such datatype. If there is more than one plausible candidate, find their lowest commonancestor and set it as the range of the datatype property.

References

[1] Built-in datatype hierarchy http://www.w3.org/TR/xmlschema-2/built-in-datatypes[2] Rector, A., Drummond, N., Horridge, M., Rogers, J., Knublauch, H., Stevens, R., Wang,H., and Wroe, C. (2004). OWL pizzas: Practical experience of teaching OWL-DL: Commonerrors & common patterns. In Engineering Knowledge in the Age of the Semantic Web,pages 63-81. Springer.

Table 3: P19. Defining multiple domains or ranges in properties

5

OOPS!: on-line ontology diagnosis

P19 descriptionTitle

P19. Defining multiple domains or ranges in proper-ties

Importancelevel

Critical

Aspects Wrong inference Affects toObject propertiesDatatype properties

DescriptionThe domain or range (or both) of a property (relationships and attributes) is defined by stating more thanone rdfs:domain or rdfs:range statements. In OWL multiple rdfs:domain or rdfs:range axioms are allowed,but they are interpreted as conjunction, being, therefore, equivalent to the construct owl:intersectionOf.This pitfall is related to the common error that appears when defining domains and ranges described in [2].

ExamplesGraphical representation and/or OWL code Natural language description

Event

Nation

<<owl:ObjectProperty>> takesPlaceIn

<<rdfs:domain>>

<<rdfs:range>>

City

<<rdfs:range>>

The graphical example shows an object property,“takesPlacesIn”, whose domain is the class “Event”and whose range is defined as “City” and as “Na-tion”. As the range of the relationship is interpretedas an intersection, whenever an individual appears asobject in such relationship, it will be classified bothas instance of “City” and “Nation”. This situationis probably not intended by the developer, since theintersection of “City” and “Nation” is the empty set.

How to solve itIf there is more than one rdfs:domain or rdfs:range statements defined for a given object or datatypeproperty, check:

For domains:

(a) For each object or datatype property with multiple domains in the ontology, we recommend answeringthe following question “Does every individual in the domain of the given property necessarily belongto each and every one of the intersected classes?”. If the answer is “no”, developers should (a) join theclasses that appear in the different domain declarations by the “or” operator (i.e., owl:unionOf) and setthis union of classes as the domain of the property and (b) remove the initial rdfs:domain declarations.

For ranges:

(a) For each object property with multiple ranges in the ontology, we recommend answering the followingquestion “Does every individual in the range of the given object property necessarily belong to each andevery one of the intersected classes?”. If the answer is “no”, developers should (a) join the classes thatappear in the different range declarations by the “or” operator (i.e., owl:unionOf) and set this union ofclasses as the range of the property and (b) remove the initial rdfs:range declarations.

(b) For each datatype property with multiple domains in the ontology, we recommend including at mostone datatype as range. We recommend taking into account the built-in datatype hierarchy defined in[1] to select such datatype. If there is more than one plausible candidate, find their lowest commonancestor and set it as the range of the datatype property.

References

[1] Built-in datatype hierarchy http://www.w3.org/TR/xmlschema-2/built-in-datatypes[2] Rector, A., Drummond, N., Horridge, M., Rogers, J., Knublauch, H., Stevens, R., Wang,H., and Wroe, C. (2004). OWL pizzas: Practical experience of teaching OWL-DL: Commonerrors & common patterns. In Engineering Knowledge in the Age of the Semantic Web,pages 63-81. Springer.

Table 3: P19. Defining multiple domains or ranges in properties

5

Pitfalls and methods: example P19

28

P19. Defining multiple domains or ranges in properties

TitleP19. Defining multiple domains or ranges in proper-ties

Importancelevel

Critical

Aspects Wrong inference Affects toObject propertiesDatatype properties

DescriptionThe domain or range (or both) of a property (relationships and attributes) is defined by stating more thanone rdfs:domain or rdfs:range statements. In OWL multiple rdfs:domain or rdfs:range axioms are allowed,but they are interpreted as conjunction, being, therefore, equivalent to the construct owl:intersectionOf.This pitfall is related to the common error that appears when defining domains and ranges described in [2].

ExamplesGraphical representation and/or OWL code Natural language description

The graphical example shows an object property,“takesPlacesIn”, whose domain is the class “Event”and whose range is defined as “City” and as “Na-tion”. As the range of the relationship is interpretedas an intersection, whenever an individual appears asobject in such relationship, it will be classified bothas instance of “City” and “Nation”. This situationis probably not intended by the developer, since theintersection of “City” and “Nation” is the empty set.

How to solve itIf there is more than one rdfs:domain or rdfs:range statements defined for a given object or datatypeproperty, check:

For domains:

(a) For each object or datatype property with multiple domains in the ontology, we recommend answeringthe following question “Does every individual in the domain of the given property necessarily belongto each and every one of the intersected classes?”. If the answer is “no”, developers should (a) join theclasses that appear in the different domain declarations by the “or” operator (i.e., owl:unionOf) and setthis union of classes as the domain of the property and (b) remove the initial rdfs:domain declarations.

For ranges:

(a) For each object property with multiple ranges in the ontology, we recommend answering the followingquestion “Does every individual in the range of the given object property necessarily belong to each andevery one of the intersected classes?”. If the answer is “no”, developers should (a) join the classes thatappear in the different range declarations by the “or” operator (i.e., owl:unionOf) and set this union ofclasses as the range of the property and (b) remove the initial rdfs:range declarations.

(b) For each datatype property with multiple domains in the ontology, we recommend including at mostone datatype as range. We recommend taking into account the built-in datatype hierarchy defined in[1] to select such datatype. If there is more than one plausible candidate, find their lowest commonancestor and set it as the range of the datatype property.

References

[1] Built-in datatype hierarchy http://www.w3.org/TR/xmlschema-2/built-in-datatypes[2] Rector, A., Drummond, N., Horridge, M., Rogers, J., Knublauch, H., Stevens, R., Wang,H., and Wroe, C. (2004). OWL pizzas: Practical experience of teaching OWL-DL: Commonerrors & common patterns. In Engineering Knowledge in the Age of the Semantic Web,pages 63-81. Springer.

Table 1: P19. Defining multiple domains or ranges in properties

1

TitleP19. Defining multiple domains or ranges in proper-ties

Importancelevel

Critical

Aspects Wrong inference Affects toObject propertiesDatatype properties

DescriptionThe domain or range (or both) of a property (relationships and attributes) is defined by stating more thanone rdfs:domain or rdfs:range statements. In OWL multiple rdfs:domain or rdfs:range axioms are allowed,but they are interpreted as conjunction, being, therefore, equivalent to the construct owl:intersectionOf.This pitfall is related to the common error that appears when defining domains and ranges described in [2].

ExamplesGraphical representation and/or OWL code Natural language description

Event

Nation

<<owl:ObjectProperty>> takesPlaceIn

<<rdfs:domain>>

<<rdfs:range>>

City

<<rdfs:range>>

The graphical example shows an object property,“takesPlacesIn”, whose domain is the class “Event”and whose range is defined as “City” and as “Na-tion”. As the range of the relationship is interpretedas an intersection, whenever an individual appears asobject in such relationship, it will be classified bothas instance of “City” and “Nation”. This situationis probably not intended by the developer, since theintersection of “City” and “Nation” is the empty set.

How to solve itIf there is more than one rdfs:domain or rdfs:range statements defined for a given object or datatypeproperty, check:

For domains:

(a) For each object or datatype property with multiple domains in the ontology, we recommend answeringthe following question “Does every individual in the domain of the given property necessarily belongto each and every one of the intersected classes?”. If the answer is “no”, developers should (a) join theclasses that appear in the different domain declarations by the “or” operator (i.e., owl:unionOf) and setthis union of classes as the domain of the property and (b) remove the initial rdfs:domain declarations.

For ranges:

(a) For each object property with multiple ranges in the ontology, we recommend answering the followingquestion “Does every individual in the range of the given object property necessarily belong to each andevery one of the intersected classes?”. If the answer is “no”, developers should (a) join the classes thatappear in the different range declarations by the “or” operator (i.e., owl:unionOf) and set this union ofclasses as the range of the property and (b) remove the initial rdfs:range declarations.

(b) For each datatype property with multiple domains in the ontology, we recommend including at mostone datatype as range. We recommend taking into account the built-in datatype hierarchy defined in[1] to select such datatype. If there is more than one plausible candidate, find their lowest commonancestor and set it as the range of the datatype property.

References

[1] Built-in datatype hierarchy http://www.w3.org/TR/xmlschema-2/built-in-datatypes[2] Rector, A., Drummond, N., Horridge, M., Rogers, J., Knublauch, H., Stevens, R., Wang,H., and Wroe, C. (2004). OWL pizzas: Practical experience of teaching OWL-DL: Commonerrors & common patterns. In Engineering Knowledge in the Age of the Semantic Web,pages 63-81. Springer.

Table 3: P19. Defining multiple domains or ranges in properties

5

OOPS!: on-line ontology diagnosis

P19 description

Pitfalls and methods: example P19

29

M1-P19. Detecting multiple domains or ranges in object propertiesTitle

P19. Defining multiple domains or ranges in proper-ties

Importancelevel

Critical

Aspects Wrong inference Affects toObject propertiesDatatype properties

DescriptionThe domain or range (or both) of a property (relationships and attributes) is defined by stating more thanone rdfs:domain or rdfs:range statements. In OWL multiple rdfs:domain or rdfs:range axioms are allowed,but they are interpreted as conjunction, being, therefore, equivalent to the construct owl:intersectionOf.This pitfall is related to the common error that appears when defining domains and ranges described in [2].

ExamplesGraphical representation and/or OWL code Natural language description

Event

Nation

<<owl:ObjectProperty>> takesPlaceIn

<<rdfs:domain>>

<<rdfs:range>>

City

<<rdfs:range>>

The graphical example shows an object property,“takesPlacesIn”, whose domain is the class “Event”and whose range is defined as “City” and as “Na-tion”. As the range of the relationship is interpretedas an intersection, whenever an individual appears asobject in such relationship, it will be classified bothas instance of “City” and “Nation”. This situationis probably not intended by the developer, since theintersection of “City” and “Nation” is the empty set.

How to solve itIf there is more than one rdfs:domain or rdfs:range statements defined for a given object or datatypeproperty, check:

For domains:

(a) For each object or datatype property with multiple domains in the ontology, we recommend answeringthe following question “Does every individual in the domain of the given property necessarily belongto each and every one of the intersected classes?”. If the answer is “no”, developers should (a) join theclasses that appear in the different domain declarations by the “or” operator (i.e., owl:unionOf) and setthis union of classes as the domain of the property and (b) remove the initial rdfs:domain declarations.

For ranges:

(a) For each object property with multiple ranges in the ontology, we recommend answering the followingquestion “Does every individual in the range of the given object property necessarily belong to each andevery one of the intersected classes?”. If the answer is “no”, developers should (a) join the classes thatappear in the different range declarations by the “or” operator (i.e., owl:unionOf) and set this union ofclasses as the range of the property and (b) remove the initial rdfs:range declarations.

(b) For each datatype property with multiple domains in the ontology, we recommend including at mostone datatype as range. We recommend taking into account the built-in datatype hierarchy defined in[1] to select such datatype. If there is more than one plausible candidate, find their lowest commonancestor and set it as the range of the datatype property.

References

[1] Built-in datatype hierarchy http://www.w3.org/TR/xmlschema-2/built-in-datatypes[2] Rector, A., Drummond, N., Horridge, M., Rogers, J., Knublauch, H., Stevens, R., Wang,H., and Wroe, C. (2004). OWL pizzas: Practical experience of teaching OWL-DL: Commonerrors & common patterns. In Engineering Knowledge in the Age of the Semantic Web,pages 63-81. Springer.

Table 3: P19. Defining multiple domains or ranges in properties

5

Code M1-P19. Detecting multiple domains or ranges in object propertiesPitfall

cardinality

N Method addresses Object properties

Technique Structural pattern matching Pitfall affects to

Object propertiesDatatype properties

Description

This method iterates over the list of object properties included in the ontology.If an object property has more than one rdfs:domain axiom (pattern A) and the classes the domain axiomsrefer to do not match, then a pitfall is flagged.If an object property has more than one rdfs:range axiom (pattern B) and the classes the range axiomsrefer to do not match, then a pitfall is flagged.

The method checks if the multiple classes declared as domain or range are the same class or equiva-lent classes. If class restrictions apply, the method checks whether they are syntactically equivalent.

Limitations

The method does not check if two different class restrictions or anonymous classes logically represent identicalsets of individuals.

Patterns

Graphical representation and/or OWL code Natural language descriptionPattern A:

ClassA ClassB

<<owl:ObjectProperty>> objectPropertyS

<<rdfs:domain>> <<rdfs:domain>> The graphical pattern shows an object property thathas two rdfs:domain axioms defined.

Pattern B:

ClassA ClassB

<<owl:ObjectProperty>> objectPropertyS

<<rdfs:range>> <<rdfs:range>> The graphical pattern shows an object property thathas two rdfs:range axioms defined.

Table 1: Detection method 1 proposed for P19

1

M2-P19. Detecting multiple domains or ranges in datatype properties

Code M2-P19. Detecting multiple domains or ranges in datatype propertiesPitfallcardinality

N Method addresses Datatype properties

Technique Structural pattern matching Pitfall affects toObject propertiesDatatype properties

DescriptionThis method iterates over the list of datatype properties included in the ontology.If a datatype property has more than one rdfs:domain axiom (pattern A) and the classes the domainaxioms refer to do not match, then a pitfall is flagged.If a datatype property has more than one rdfs:range axiom (pattern B) and the datatypes the rangeaxioms refer to are not the same one, then a pitfall is flagged.

The method checks if the multiple classes declared as domain are the same class or equivalent classes. Ifclass restrictions apply, the method checks whether they are syntactically equivalent.

LimitationsThe method does not check if two different class restrictions or anonymous classes logically represent identicalsets of individuals.

PatternsGraphical representation and/or OWL code Natural language description

Pattern A:

ClassA ClassB

<<owl:DatatypeProperty>> datatypePropertyS

<<rdfs:domain>> <<rdfs:domain>> The graphical pattern shows a datatype propertythat has two rdfs:domain axioms defined.

Pattern B:

<<primitive>> xsd:datatype1

<<owl:DatatypeProperty>> datatypePropertyS

<<rdfs:range>> <<rdfs:range>>

<<primitive>> xsd:datatype2 The graphical pattern shows a datatype property

that has two rdfs:range axioms defined.

Table 5: Detection method 2 proposed for P19

7

OOPS!: on-line ontology diagnosis

M1-P19

M2-P19

Code M1-P19. Detecting multiple domains or ranges in object propertiesPitfall

cardinality

N Method addresses Object properties

Technique Structural pattern matching Pitfall affects to

Object propertiesDatatype properties

Description

This method iterates over the list of object properties included in the ontology.If an object property has more than one rdfs:domain axiom (pattern A) and the classes the domain axiomsrefer to do not match, then a pitfall is flagged.If an object property has more than one rdfs:range axiom (pattern B) and the classes the range axiomsrefer to do not match, then a pitfall is flagged.

The method checks if the multiple classes declared as domain or range are the same class or equiva-lent classes. If class restrictions apply, the method checks whether they are syntactically equivalent.

Limitations

The method does not check if two different class restrictions or anonymous classes logically represent identicalsets of individuals.

Patterns

Graphical representation and/or OWL code Natural language descriptionPattern A:

ClassA ClassB

<<owl:ObjectProperty>> objectPropertyS

<<rdfs:domain>> <<rdfs:domain>> The graphical pattern shows an object property thathas two rdfs:domain axioms defined.

Pattern B:

ClassA ClassB

<<owl:ObjectProperty>> objectPropertyS

<<rdfs:range>> <<rdfs:range>> The graphical pattern shows an object property thathas two rdfs:range axioms defined.

Table 1: Detection method 1 proposed for P19

1

Pitfalls and methods: example P19

30

TitleP19. Defining multiple domains or ranges in proper-ties

Importancelevel

Critical

Aspects Wrong inference Affects toObject propertiesDatatype properties

DescriptionThe domain or range (or both) of a property (relationships and attributes) is defined by stating more thanone rdfs:domain or rdfs:range statements. In OWL multiple rdfs:domain or rdfs:range axioms are allowed,but they are interpreted as conjunction, being, therefore, equivalent to the construct owl:intersectionOf.This pitfall is related to the common error that appears when defining domains and ranges described in [2].

ExamplesGraphical representation and/or OWL code Natural language description

Event

Nation

<<owl:ObjectProperty>> takesPlaceIn

<<rdfs:domain>>

<<rdfs:range>>

City

<<rdfs:range>>

The graphical example shows an object property,“takesPlacesIn”, whose domain is the class “Event”and whose range is defined as “City” and as “Na-tion”. As the range of the relationship is interpretedas an intersection, whenever an individual appears asobject in such relationship, it will be classified bothas instance of “City” and “Nation”. This situationis probably not intended by the developer, since theintersection of “City” and “Nation” is the empty set.

How to solve itIf there is more than one rdfs:domain or rdfs:range statements defined for a given object or datatypeproperty, check:

For domains:

(a) For each object or datatype property with multiple domains in the ontology, we recommend answeringthe following question “Does every individual in the domain of the given property necessarily belongto each and every one of the intersected classes?”. If the answer is “no”, developers should (a) join theclasses that appear in the different domain declarations by the “or” operator (i.e., owl:unionOf) and setthis union of classes as the domain of the property and (b) remove the initial rdfs:domain declarations.

For ranges:

(a) For each object property with multiple ranges in the ontology, we recommend answering the followingquestion “Does every individual in the range of the given object property necessarily belong to each andevery one of the intersected classes?”. If the answer is “no”, developers should (a) join the classes thatappear in the different range declarations by the “or” operator (i.e., owl:unionOf) and set this union ofclasses as the range of the property and (b) remove the initial rdfs:range declarations.

(b) For each datatype property with multiple domains in the ontology, we recommend including at mostone datatype as range. We recommend taking into account the built-in datatype hierarchy defined in[1] to select such datatype. If there is more than one plausible candidate, find their lowest commonancestor and set it as the range of the datatype property.

References

[1] Built-in datatype hierarchy http://www.w3.org/TR/xmlschema-2/built-in-datatypes[2] Rector, A., Drummond, N., Horridge, M., Rogers, J., Knublauch, H., Stevens, R., Wang,H., and Wroe, C. (2004). OWL pizzas: Practical experience of teaching OWL-DL: Commonerrors & common patterns. In Engineering Knowledge in the Age of the Semantic Web,pages 63-81. Springer.

Table 3: P19. Defining multiple domains or ranges in properties

5

M1-P19. Detecting multiple domains or ranges in object properties

M2-P19. Detecting multiple domains or ranges in datatype properties

Code M2-P19. Detecting multiple domains or ranges in datatype propertiesPitfallcardinality

N Method addresses Datatype properties

Technique Structural pattern matching Pitfall affects toObject propertiesDatatype properties

DescriptionThis method iterates over the list of datatype properties included in the ontology.If a datatype property has more than one rdfs:domain axiom (pattern A) and the classes the domainaxioms refer to do not match, then a pitfall is flagged.If a datatype property has more than one rdfs:range axiom (pattern B) and the datatypes the rangeaxioms refer to are not the same one, then a pitfall is flagged.

The method checks if the multiple classes declared as domain are the same class or equivalent classes. Ifclass restrictions apply, the method checks whether they are syntactically equivalent.

LimitationsThe method does not check if two different class restrictions or anonymous classes logically represent identicalsets of individuals.

PatternsGraphical representation and/or OWL code Natural language description

Pattern A:

ClassA ClassB

<<owl:DatatypeProperty>> datatypePropertyS

<<rdfs:domain>> <<rdfs:domain>> The graphical pattern shows a datatype propertythat has two rdfs:domain axioms defined.

Pattern B:

<<primitive>> xsd:datatype1

<<owl:DatatypeProperty>> datatypePropertyS

<<rdfs:range>> <<rdfs:range>>

<<primitive>> xsd:datatype2 The graphical pattern shows a datatype property

that has two rdfs:range axioms defined.

Table 5: Detection method 2 proposed for P19

7

Code M1-P19. Detecting multiple domains or ranges in object propertiesPitfall

cardinality

N Method addresses Object properties

Technique Structural pattern matching Pitfall affects to

Object propertiesDatatype properties

Description

This method iterates over the list of object properties included in the ontology.If an object property has more than one rdfs:domain axiom (pattern A) and the classes the domain axiomsrefer to do not match, then a pitfall is flagged.If an object property has more than one rdfs:range axiom (pattern B) and the classes the range axiomsrefer to do not match, then a pitfall is flagged.

The method checks if the multiple classes declared as domain or range are the same class or equiva-lent classes. If class restrictions apply, the method checks whether they are syntactically equivalent.

Limitations

The method does not check if two different class restrictions or anonymous classes logically represent identicalsets of individuals.

Patterns

Graphical representation and/or OWL code Natural language descriptionPattern A:

ClassA ClassB

<<owl:ObjectProperty>> objectPropertyS

<<rdfs:domain>> <<rdfs:domain>> The graphical pattern shows an object property thathas two rdfs:domain axioms defined.

Pattern B:

ClassA ClassB

<<owl:ObjectProperty>> objectPropertyS

<<rdfs:range>> <<rdfs:range>> The graphical pattern shows an object property thathas two rdfs:range axioms defined.

Table 1: Detection method 1 proposed for P19

1

Code M1-P19. Detecting multiple domains or ranges in object propertiesPitfall

cardinality

N Method addresses Object properties

Technique Structural pattern matching Pitfall affects to

Object propertiesDatatype properties

Description

This method iterates over the list of object properties included in the ontology.If an object property has more than one rdfs:domain axiom (pattern A) and the classes the domain axiomsrefer to do not match, then a pitfall is flagged.If an object property has more than one rdfs:range axiom (pattern B) and the classes the range axiomsrefer to do not match, then a pitfall is flagged.

The method checks if the multiple classes declared as domain or range are the same class or equiva-lent classes. If class restrictions apply, the method checks whether they are syntactically equivalent.

Limitations

The method does not check if two different class restrictions or anonymous classes logically represent identicalsets of individuals.

Patterns

Graphical representation and/or OWL code Natural language descriptionPattern A:

ClassA ClassB

<<owl:ObjectProperty>> objectPropertyS

<<rdfs:domain>> <<rdfs:domain>> The graphical pattern shows an object property thathas two rdfs:domain axioms defined.

Pattern B:

ClassA ClassB

<<owl:ObjectProperty>> objectPropertyS

<<rdfs:range>> <<rdfs:range>> The graphical pattern shows an object property thathas two rdfs:range axioms defined.

Table 1: Detection method 1 proposed for P19

1

Code M2-P19. Detecting multiple domains or ranges in datatype propertiesPitfallcardinality

N Method addresses Datatype properties

Technique Structural pattern matching Pitfall affects toObject propertiesDatatype properties

DescriptionThis method iterates over the list of datatype properties included in the ontology.If a datatype property has more than one rdfs:domain axiom (pattern A) and the classes the domainaxioms refer to do not match, then a pitfall is flagged.If a datatype property has more than one rdfs:range axiom (pattern B) and the datatypes the rangeaxioms refer to are not the same one, then a pitfall is flagged.

The method checks if the multiple classes declared as domain are the same class or equivalent classes. Ifclass restrictions apply, the method checks whether they are syntactically equivalent.

LimitationsThe method does not check if two different class restrictions or anonymous classes logically represent identicalsets of individuals.

PatternsGraphical representation and/or OWL code Natural language description

Pattern A:

ClassA ClassB

<<owl:DatatypeProperty>> datatypePropertyS

<<rdfs:domain>> <<rdfs:domain>> The graphical pattern shows a datatype propertythat has two rdfs:domain axioms defined.

Pattern B:

<<primitive>> xsd:datatype1

<<owl:DatatypeProperty>> datatypePropertyS

<<rdfs:range>> <<rdfs:range>>

<<primitive>> xsd:datatype2 The graphical pattern shows a datatype property

that has two rdfs:range axioms defined.

Table 5: Detection method 2 proposed for P19

7

Code M2-P19. Detecting multiple domains or ranges in datatype propertiesPitfallcardinality

N Method addresses Datatype properties

Technique Structural pattern matching Pitfall affects toObject propertiesDatatype properties

DescriptionThis method iterates over the list of datatype properties included in the ontology.If a datatype property has more than one rdfs:domain axiom (pattern A) and the classes the domainaxioms refer to do not match, then a pitfall is flagged.If a datatype property has more than one rdfs:range axiom (pattern B) and the datatypes the rangeaxioms refer to are not the same one, then a pitfall is flagged.

The method checks if the multiple classes declared as domain are the same class or equivalent classes. Ifclass restrictions apply, the method checks whether they are syntactically equivalent.

LimitationsThe method does not check if two different class restrictions or anonymous classes logically represent identicalsets of individuals.

PatternsGraphical representation and/or OWL code Natural language description

Pattern A:

ClassA ClassB

<<owl:DatatypeProperty>> datatypePropertyS

<<rdfs:domain>> <<rdfs:domain>> The graphical pattern shows a datatype propertythat has two rdfs:domain axioms defined.

Pattern B:

<<primitive>> xsd:datatype1

<<owl:DatatypeProperty>> datatypePropertyS

<<rdfs:range>> <<rdfs:range>>

<<primitive>> xsd:datatype2 The graphical pattern shows a datatype property

that has two rdfs:range axioms defined.

Table 5: Detection method 2 proposed for P19

7

P19 description

OOPS!: on-line ontology diagnosis

Table of Contents

• Introduction

• Approach

• Pitfall catalogue

• OOPS!

• Future lines of work

31

OOPS!: on-line ontology diagnosis

OOPS! – OntOlogy Pitfall Scanner!

32

§ Implements the 48 detection methods for 33o Pitfalls selectiono Selection by dimensions and aspects

§ Web user interface http://oops.linkeddata.es/§ Web service http://oops-ws.oeg-upm.net/

URI input

OWL code input

OOPS!: on-line ontology diagnosis

OOPS! – OntOlogy Pitfall Scanner!

33

§ Implements the 48 detection methods for 33o Pitfalls selectiono Selection by dimensions and aspects

§ Web user interface http://oops.linkeddata.es/§ Web service http://oops-ws.oeg-upm.net/

URI input

OWL code input

Importance level

Pitfall description

Affected elements

OOPS!: on-line ontology diagnosis

OOPS! – OntOlogy Pitfall Scanner!

34

§ Implements the 48 detection methods for 33o Pitfalls selectiono Selection by dimensions and aspects

§ Web user interface http://oops.linkeddata.es/§ Web service http://oops-ws.oeg-upm.net/

URI input

OWL code input

Importance level

Pitfall description

Affected elements

1. OOPS! USER INTERFACE AND WEB SERVICE

– oops:hasDescription: indicates the description of the suggestion value.

– oops:hasAffectedElement: this element will contain as many URIs as ele-ments detected during the analysis.

Listing ?? shows an example of response provided by the web service in formatRDF/XML for the request shown in Listing ??. It can be observed that the requestindicated three pitfalls to be detected from which only two have been found.

1 <rdf:RDF2 xmlns : rd f=" ht tp : //www.w3 . org /1999/02/22´ rdf´syntax´ns#"3 xmlns:owl=" ht tp : //www.w3 . org /2002/07/ owl#"4 xmlns:xsd=" ht tp : //www.w3 . org /2001/XMLSchema#"5 xmlns:oops=" ht tp : //www. oeg upm. net /oops#"6 xmlns : rd f s=" ht tp : //www.w3 . org /2000/01/ rdf´schema#" >7 <rd f :D e s c r i p t i o n rd f : about=" ht tp : //www. oeg upm. net /oops#sugge s t i on ">8 <rd f : t yp e r d f : r e s o u r c e=" ht tp : //www.w3 . org /2002/07/ owl#Class "/>9 </ rd f :D e s c r i p t i o n>

10 <rd f :D e s c r i p t i o n rd f : about=" ht tp : //www. oeg upm. net /oops/ fdea1aa6 ´71d6´4557´a17a´dc3244f f536b ">

11 <oops:hasCode rd f : da ta type=" ht tp : //www.w3 . org /2001/XMLSchema#s t r i n g ">P10</oops:hasCode>

12 <oops:hasName rd f : da ta type=" ht tp : //www.w3 . org /2001/XMLSchema#s t r i n g ">Miss ingd i s j o i n t n e s s [ 1 , 2 , 3 ]</oops:hasName>

13 <oops :ha sDes c r i p t i on rd f : da ta type=" ht tp : //www.w3 . org /2001/XMLSchema#s t r i n g ">The onto logy l a ck s d i s j o i n t axioms between c l a s s e s or between p r op e r t i e sthat should be de f ined as d i s j o i n t .</ oops :ha sDes c r i p t i on> <rd f : t yp er d f : r e s o u r c e=" ht tp : //www. oeg upm. net /oops#p i t f a l l "/>

14 <oops :hasImportanceLeve l rd f : da ta type=" ht tp : //www.w3 . org /2001/XMLSchema#s t r i n g ">Important</ oops :hasImportanceLeve l>

15 <oops:hasNumberAffectedElements rd f : da ta type=" ht tp : //www.w3 . org /2001/XMLSchema#in t e g e r ">1</oops:hasNumberAffectedElements>

16 </ rd f :D e s c r i p t i o n>17 <rd f :D e s c r i p t i o n rd f : about=" ht tp : //www. oeg upm. net /oops /496 ae03d ´48c6 ´406d´8

d07´530bf05c9ac1 ">18 <oop s : h a sP i t f a l l r d f : r e s o u r c e=" ht tp : //www. oeg upm. net /oops/ fdea1aa6 ´71d6

´4557´a17a´dc3244f f536b "/>19 <rd f : t yp e r d f : r e s o u r c e=" ht tp : //www. oeg upm. net /oops#response "/>20 </ rd f :D e s c r i p t i o n>21 <rd f :D e s c r i p t i o n rd f : about=" ht tp : //www. oeg upm. net /oops#p i t f a l l ">22 <rd f : t yp e r d f : r e s o u r c e=" ht tp : //www.w3 . org /2002/07/ owl#Class "/>23 </ rd f :D e s c r i p t i o n>24 </rdf:RDF>

Listing 1.4: Example of XML/RDF response from the web service

8

OOPS!: on-line ontology diagnosis

Pitfall coverage comparison with state of the art

35

Pitfalls OOPS! XD-Analyzer Moki OntoCheckP02, P03, P05, P06, P10, P12, P20, P21, P25, P26, P27, P28, P29, P30, P31, P32, P33, P36,P37, P38, P39, P40, P41

P24 ≈P13, P19, P34, P35 ✔ ✔

P07, P22 ✔ ✔

P11 ✔ ✔ ✔

P08 ✔ ✔ ✔ ✔

P04 ≈ ✔ ≈ ≈P01, P09, P14, P15, P16, P17, P18, P23

✔ Pitfall covered

≈ Pitfall partially covered

OOPS!: on-line ontology diagnosis

Most common pitfalls in ontologies

36

129$ 125$86$

55$ 53$ 45$19$ 13$ 12$ 11$ 6$

663$

378$

219$ 202$

134$ 133$ 115$ 108$ 88$ 73$ 69$

807$

694$

484$446$

159$100$ 80$ 76$ 55$ 37$

0$0$

100$

200$

300$

400$

500$

600$

700$

800$

900$

P08.$Missing$annota6ons$

P13.$Inverse$rela6onships$not$explicitly$declared$

P11.$Missing$domain$or$range$in$proper6es$

P04.$Crea6ng$unconnected$ontology$elements$

P22.$Using$different$naming$conven6ons$in$the$ontology$

P10.$Missing$disjointness$

**P41.$No$license$declared$

P24.$Using$recursive$defini6ons$

P07.$Merging$different$concepts$in$the$same$class$

P12.$Equivalent$proper6es$not$explicitly$declared$

*P35.$Untyped$property$$

P19.$Defining$mul6ple$domains$or$ranges$in$proper6es$

*P40.$Namespace$hijacking$$

*P34.$Untyped$class$$

*P30.$Equivalent$classes$not$explicitly$declared$

*P36.$URI$contains$file$extension$$

*P38.$No$OW

L$ontology$declara6on$$

P05.$Defining$wrong$inverse$rela6onships$$

P20.$Misusing$ontology$annota6ons$$

P02.$Crea6ng$synonyms$as$classes$$

P25.$Defining$a$rela6onship$as$inverse$to$itself$$

P26.$Defining$inverse$rela6onships$for$a$symmetric$one$$

P21.$Using$a$miscellaneous$class$$

P29.$Defining$wrong$transi6ve$rela6onships$$

*P39.$Ambiguous$namespace$$

*P31.$Defining$wrong$equivalent$classes$$

*P32.$Several$classes$with$the$same$label$$

P06.$Including$cycles$in$a$class$hierarchy$$

*P37.$Ontology$not$available$on$the$Web$

P27.$Defining$wrong$equivalent$proper6es$$

P28.$Defining$wrong$symmetric$rela6onships$$

P03.$Crea6ng$the$rela6onship$“is”$instead$of…$

*P33.$Crea6ng$a$property$chain$with$just$one$property$$

Num

ber'o

f'ontologies'

Pi1all'

Pi1alls'appearance'in'ontologies'

Cri6cal$ Important$ Minor$

*$Pi[all$included$in$September$2013$(evaluated$410$ontologies)$**$Pi[all$included$in$March$2015$(evaluated$over$329$ontologies)$Pi[alls$without$*$have$been$evaluated$over$696$ontologies$since$November$2011$

P40. Namespace hijacking

P41. No license declared

OOPS!: on-line ontology diagnosis

International adoption and use

37

§ 60 Countries§ 3000 times used

OOPS!: on-line ontology diagnosis

Adoption and use

38

§ Used at university courses§ Used in scientific reports

o Evaluation and assessment§ Used in companies

o Development and training

§ Integrated in other systems:o 3 External: LOV, OntoHub, DrOntoAPIo 3 OEG: Widoco, SmartCity ontology catalogue, OnToology

OOPS!: on-line ontology diagnosis

Table of Contents

• Introduction

• Approach

• Pitfall catalogue

• OOPS!

• Future lines of work

39

OOPS!: on-line ontology diagnosis

Wrapping up

40

Pitfall catalogue

§ 41 pitfall descriptions§ Importance levels§ Classification§ Repair tips

Detection methods

§ 48 methods § 33 pitfalls

OOPS!

§ Access for users and systems

§ Broadly used and adopted

OOPS!: on-line ontology diagnosis

Future lines of work

41

OOPS!§ To integrate OOPS! within ontology

editors

§ To carry out a quantitative assessment of OOPS!

Pitfall catalogue

§ To maintain and extendthe catalogue

o Multilingualism

o Metadata

o Annotations

o Adapt to OWL 2

§ To establish relationships between pitfalls

Detection methods

§ To transform and compare structural patterns with SPARQLqueries

§ To improve detection methods (linguistic techniques)

§ To include the guidelines for ontology repair

§ To improve scalability for large ontologies

§ To use data during the diagnosis

§ Diagnosis of the data? Potential integration with Loupe

OOPS!: on-line ontology diagnosis

Questions?

Thanks for your attention!

42

OOPS!: on-line ontology diagnosis

References

43

§ Poveda Villalón, M. (2016). Ontology Evaluation: a pitfall-based approach to ontology diagnosis (Doctoral dissertation, ETSI_Informatica).

§ Poveda-Villalón, M., Gómez-Pérez, A., & Suárez-Figueroa, M. C. (2014). Oops!(ontology pitfall scanner!): An on-line tool for ontology evaluation. International Journal on Semantic Web and Information Systems (IJSWIS), 10(2), 7-34.

Icons made by Freepik from www.flaticon.com

OOPS! (ONTOLOGY PITFALL SCANNER!): ON-LINE ONTOLOGY DIAGNOSIS

María Poveda-VillalónMari Carmen Suárez-Figueroa and Asunción Gómez-Pérez

Ontology Engineering Group. Universidad Politécnica de Madrid.

[email protected]

Data Quality Tutorial – SEMANTICS 201612th September

This work has been partially supported by the Spanish project "4V: volumen, velocidad, variedad y validez en la gestión innovadora de datos” (TIN2013-46238-C4-2-R) and the European project “Ready4SmartCities - ICT Roadmap and Data Interoperability for Energy Systems in Smart Cities” (FP7-608711).

OOPS! website: http://oops.linkeddata.esTwitter account: @OOPSoeg