ontology engineering lab #3 – september 16, 2013

20
Ontology Engineering Lab #3 – September 16, 2013

Upload: lewis-baldwin

Post on 18-Jan-2016

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ontology Engineering Lab #3 – September 16, 2013

Ontology Engineering

Lab #3 – September 16, 2013

Page 2: Ontology Engineering Lab #3 – September 16, 2013

2

Review – RDF, RDF-S, and OWL RDF provides rules to form well-formed

statements Three parts: subject, predicate and object Commonly depicted as directed graphs having

nodes and edges Subject and Predicate must be a resource (an

entity identified by a URI) Object can be either a resource or a literal value Predicates are binary only

Page 3: Ontology Engineering Lab #3 – September 16, 2013

3

Review – RDF, RDF-S, and OWL This trio of languages provides a vocabulary

for building machine processable ontologies Class hierarchies (i.e. taxonomies) can be built by

subsuming one named class under another (rdfs:subClassOf)

But we also can use restrictions on other relationships to create subclass and equivalent class relations to anonymous classes Existential Restriction – members of the restricted class

must be related via the property to at least one member of the object class

Universal Restriction – if a member of the restricted class is related via the property to an entity then that entity must be a member of the object class

Page 4: Ontology Engineering Lab #3 – September 16, 2013

4

Review – Necessary and Sufficient Conditions “All acts of inhabitance are acts performed by

persons.” is an expression of a necessary condition to be an act of inhabitance. Other ways to express this are: If a1 is an act of inhabitance then a1 is performed

by a person If a1 is not an act performed by a person, then a1

is not an act of inhabitance The class of act of inhabitance is a subclass of act

performed by person This is not, however, an expression of a

sufficient condition for being an act of inhabitance In order for S to be a sufficient condition of N it

must be true that if S then N

Page 5: Ontology Engineering Lab #3 – September 16, 2013

5

Review – Equivalent Classes Two classes are equivalent if and only if they

have the same members Example: Even Numbers and Numbers divisible by

2 If two classes are equivalent then membership in

one is both a necessary and sufficient condition of the other If n is an even number then n is divisible by 2 If n is divisible by 2 then n is an event number

In Protégé, A Primitive Class is one that has only subclass

restrictions (necessary condition) A Defined Class is one that has equivalent class

restriction (necessary and sufficient condition)

Page 6: Ontology Engineering Lab #3 – September 16, 2013

6

The conditions of class membership can be expressed by providing a list of the individuals that are its members e.g. A continent is one of Africa, Asia, Antarctica,

Europe, North America, Oceania, South America The technique can be used for subclass

restrictions but seems best suited for equivalent class restrictions

The type of the individuals can be, but need not be, explicitly asserted (rdf:type). If not, it will be inferred by the reasoner

Enumerated Classes

Page 7: Ontology Engineering Lab #3 – September 16, 2013

7

Set Operations on Classes The intersection (and) operand can be used to

express that a class is either a subclass of or equivalent to the class of individuals that are members of two or more classes Example: Customer of the ACME Corporation is a person

that has purchased a product from ACME Corporation Example: A sister is a female sibling

The union (or) operand can be used to express that a class is either a subclass of or equivalent to the class of individuals that are members of any of two or more classes Example: An agent is either a person or organization Example: New York State misdemeanors are either Class A

or Class B

Page 8: Ontology Engineering Lab #3 – September 16, 2013

8

Set Operations on Classes The Complement (non-) operand can be used

to express that class is a subclass of or equivalent to the class of individuals that are not members of one or more classes Example: A Violation in NYS is any offence, other

than a traffic infraction, for which a sentence to a term of imprisonment in excess of 15 days cannot be imposed

Example: Industrial diamonds are unsuitable for use as gemstones

Page 9: Ontology Engineering Lab #3 – September 16, 2013

9

Building a Taxonomy – Common Problems A common occurrence in vocabularies and code lists is the

formation of a term using operands such as “other” and “not otherwise specified”

Such terms change in meaning as new sibling terms are added to the list.

Use of the complement operand requires forethought and vigilance

Mining and Quarrying

Mining of Coal and Lignite

Extraction of crude

petroleum and natural

gas

Mining of metal ores

Other mining and quarrying

Mining support service

activities

Mining and Quarrying

Mining of Coal and Lignite

Extraction of crude

petroleum and natural

gas

Mining of metal ores

Other mining and quarrying

Mining support service

activities

Quarrying of Stone, Sand

or Clay

*example excerpted from International Standard Industrial Classification of All Economic Activities, Rev.4

Page 10: Ontology Engineering Lab #3 – September 16, 2013

10

Closure Axioms In New York State, a crime is a misdemeanor

only if it carries a sentence of no more than 1 year

In New York State, a violation is a crime that carries a penalty of no more than 15 days In Protégé we can represent this as a subclass

axiom such as: New York State Criminal Act and carries_penalty_of some 'Less than 15 days'

While it may seem valid to infer that a violation is a subtype of misdemeanor, an OWL reasoner will not make such an inference because of the Open World Assumption

Page 11: Ontology Engineering Lab #3 – September 16, 2013

11

Closed World Assumption (CWA) Some knowledge representations are part of a

context in which it is assumed that any statement not asserted in the representation is false. This is known as the Closed World Assumption Example: Any person not listed in a bank’s

database as having an account does not have an account with that bank

Example: Every person not on the US No Fly List is able to use commercial air travel to and from the United States

Page 12: Ontology Engineering Lab #3 – September 16, 2013

12

Open World Assumption (OWA) Knowledge representations in OWL make the

Open World Assumption meaning that a statement that is not asserted cannot be inferred to be false. Example: A taxonomy of all mammals does not

exclude the possibility of discovering new ones Example: A taxonomy of criminal acts does not

exclude the possibility that an act will be deemed criminal at some future point.

Page 13: Ontology Engineering Lab #3 – September 16, 2013

13

Closure Axioms vs. the OWA Does the statement: A Violation is a New York

State Criminal Act and carries_penalty_of some 'Less than 15 days' imply that such an act does not carry a sentence of more that 1 year? Not under the OWA which leaves undetermined

whether a violation might not carry a second penalty of more than 1 year

To counteract the OWA we add a universal restriction (i.e. “only”) to say that the only restrictions on a class are those explicitly stated in set of existential restrictions (i.e. “some”) Example: A Violation is a New York State Criminal

Act and carries_penalty_of only ‘Less than 15 days’

Page 14: Ontology Engineering Lab #3 – September 16, 2013

14

Disjoint Axioms Single inheritance (every class has only one

parent class) in the asserted (as opposed to the inferred) class hierarchy of an ontology (taxonomy) is a desirable attribute.

If sibling classes (classes with the same parent) have members in common maintaining single inheritance becomes difficult

Adding disjoint axioms to a group of sibling classes is the explicit statement that the classes have no common members Along with the complement operand, a disjoint

axiom introduces the possibility of a contradiction

Page 15: Ontology Engineering Lab #3 – September 16, 2013

15

Coverage Axiom In cases where a set of subclasses provides

complete coverage of their parent class (i.e. every member of the parent class must be a member of one of the subclasses) we can add a coverage axiom to express this fact

A formulaic expression of a coverage axiom:

If A, B, and C are subclasses of Z and A, B, and C provide complete coverage of Z, then this can be expressed in the form that Z is a subclass of the union of A, B, and C.

Example: In New York State, a Felony is one of 5 types: Class A, Class B, Class C, Class D or Class E. So we can say that Felony is a subclass of the class (Class A, Class B, Class C, Class D, Class E)

Page 16: Ontology Engineering Lab #3 – September 16, 2013

16

Cardinality Restrictions Minimum Cardinality – a restriction that

asserts that members of the restricted class must have a specified number of members of the restricting class along the stated property Example: A ZIP code must have part at least 5

digits Maximum Cardinality – a restriction that

asserts that members of the restricted class can have no more than a specified number of members of the restricting class along the stated property Example: A ZIP code can have part no more than 9

digits

Page 17: Ontology Engineering Lab #3 – September 16, 2013

17

Cardinality Restrictions Exact Cardinality - a restriction that asserts

that members of the restricted class must have an exact number of members of the restricting class along the stated property Example: A ZIP Plus 4 Code has part exactly 9

digits

Page 18: Ontology Engineering Lab #3 – September 16, 2013

18

A Shortcut for Disjoint Axioms To make all subclasses disjoint one needs to

write (n-1) + … (n-n) disjoint axioms where n is the number of subclasses. Example: The five types of NYS felonies (Class A –

Class E) there need to be 10 disjoint axioms Class A is disjoint with Classes B, C, D, E Class B is disjoint with Classes C, D, E Class C is disjoint with Classes D, E Class D is disjoint with Class E

To simplify this Protégé implements the owl:AllDisjointClasses class via the Make primitive siblings disjoint menu option (Ctrl + J)

Page 19: Ontology Engineering Lab #3 – September 16, 2013

19

A Shortcut for Disjoint Unions For classes that are composed of the union of

disjoint subclasses use the Protégé implementation of the owl:disjointUnionOf Example: NYS Felony is either (Class A Felony or

Class B Felony or Class C Felony or Class D Felony or Class E Felony) and all of these subclasses are disjoint

Page 20: Ontology Engineering Lab #3 – September 16, 2013

20

Exercise for 9/23 Create an .owl file that includes the content of

the following assertions: Every widget has a quality of size Three disjoint subtypes of size are small, medium

or large Two subtypes of widget tasks are commercial

widget tasks and industrial widget tasks Commercial widget tasks use only small widgets Industrial widgets are either medium or large and

are used in industrial widget tasks Medium sized widgets are made of at least 1 but

not more than 3 small sized widgets