part 5: ontologies. logic and ontologies up to now we have studied logic languages for knowledge...

25
Part 5: Ontologies

Post on 21-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Part 5: Ontologies

Page 2: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Logic and Ontologies

• Up to now we have studied Logic Languages for Knowledge Representation and Reasoning:– in both static and dynamic domains– with possibly incomplete knowledge and nonmonotonic

reasoning– interacting with the environment and completing the

knowledge, possibly contracting previous assumptios• All of this is parametric with a set of predicates

and a set of objects• The meaning of a theory depends, and is build on

top of, the meaning of the predicates and objects

Page 3: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Choice of predicates

• We want to represent that trailer trucks have 18 wheels. In 1st order logics: x trailerTruck(x) hasEighteenWheels(x) or x trailerTruck(x) numberOfWheels(x,18) or x ((truck(x) y(trailer(y) part(x,y)))

s (set(s) count(s,18) w (member(w,s) wheel(w) part(x,w)))

• The choice depends on which predicates are available• For understanding (and sharing) the represented

knowledge it is crucial that the meaning of predicates (and also of object) is formally established

Page 4: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Ontologies

• Ontologies establish a formal specification of the concepts used in representing knowledge

• Ontology: originates from philosophy as a branch of metaphysics– studies the nature of existence

– Defines what exists and the relation between existing concepts (in a given domain)

– Sought universal categories for classifying everything that exists

Page 5: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

An Ontology

• An ontology, is a catalog of the types of things that are assumed to exist in a domain.

• The types in an ontology represent the predicates, word senses, or concept and relation types of the language when used to discuss topics in the domain.

• Logic says nothing about anything, but the combination of logic with an ontology provides a language that can express relationships about the entities in the domain of interest.

• Up to now we have implicitly assumed the ontology– I assumed that you understand the meaning of predicates and

objects involved in examples

Page 6: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Aristotle’s OntologyBeing

Substance Accident

Property Relation

Inherence Directedness Containment

Quality Quantity

Movement Intermediacy

Activity Passivity Having Situated Spatial Temporal

Page 7: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

The Ontology

• Effort to defined and categorize everything that exists

• Agreeing on the ontology makes it possible to understand the concepts

• Efforts to define a big ontology, defining all concepts still exists today:– The Cyc (from Encyclopedia) ontology (over 100,000

concept types and over 1M axioms– Electronic Dictionary Research: 400,00 concept types– WordNet: 166,000 English word senses

Page 8: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Cyc Ontology

Page 9: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Cyc OntologyThing

Object Intangible

Intangible Object Collection

Process

Occurrence

RelationshipIntangible Stuff

SlotInternal machine thing

Attribute value

Attribute

Represented Thing

Event Stuff

Page 10: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Small Ontologies

• Designed for specific application• How to make these coexist with big ontologies?

Page 11: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Domain-Specific Ontologies

• Medical domain: – Cancer ontology from the National Cancer Institute in the United

States • Cultural domain:

– Art and Architecture Thesaurus (AAT) with 125,000 terms in the cultural domain

– Union List of Artist Names (ULAN), with 220,000 entries on artists

– Iconclass vocabulary of 28,000 terms for describing cultural images

• Geographical domain:– Getty Thesaurus of Geographic Names (TGN), containing over 1

million entries

Page 12: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Ontologies and the Web

• In the Web ontologies provide shared understanding of a domain– It is crucial to deal with differences in terminology

• To understand data in the web it is crucial that an ontology exists

• To be able to automatically understand the data, and use in a distributed environment it is crucial that the ontology is:– Explicitly defined– Available in the Web

• The Semantic Web initiative provides (web) languages for defining ontologies (RDF, RDF Schema, OWL)

Page 13: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Defining an Ontology

• How to define a catalog of the types of things that are assumed to exist in a domain?– I.e. how to define an ontology for a given domains?

• What makes an ontology?– Entities in a taxonomy– Attributes– Properties and relations– Facets– Instances

• Similar to ER models in databases

Page 14: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Main Stages in Ontology Development

1. Determine scope2. Consider reuse3. Enumerate terms4. Define taxonomy5. Define properties6. Define facets7. Define instances8. Check for anomaliesNot a linear process!

Page 15: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Determine Scope

• There is no correct ontology of a specific domain – An ontology is an abstraction of a particular

domain, and there are always viable alternatives

• What is included in this abstraction should be determined by – the use to which the ontology will be put– by future extensions that are already anticipated

Page 16: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Determine Scope (cont)

• Basic questions to be answered at this stage are: – What is the domain that the ontology will

cover? – For what we are going to use the ontology? – For what types of questions should the

ontology provide answers? – Who will use and maintain the ontology?

Page 17: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Consider Reuse

• One rarely has to start from scratch when defining an ontology – In these web days, there is almost always an

ontology available that provides at least a useful starting point for our own ontology

• With the Semantic Web, ontologies will become even more widely available

Page 18: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Enumerate Terms

• Write down in an unstructured list all the relevant terms that are expected to appear in the ontology– Nouns form the basis for class names

– Verbs form the basis for property/predicate names

• Traditional knowledge engineering tools (e.g. laddering and grid analysis) can be used to obtain – the set of terms

– an initial structure for these terms

Page 19: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Define the Taxonomy

• Relevant terms must be organized in a taxonomic is_a hierarchy– Opinions differ on whether it is more

efficient/reliable to do this in a top-down or a bottom-up fashion

• Ensure that hierarchy is indeed a taxonomy:– If A is a subclass of B, then every object of

type A must also be an object of type B

Page 20: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Define Properties

• Often interleaved with the previous step• Attach properties to the highest class in the

hierarchy to which they apply:– Inheritance applies to properties

• While attaching properties to classes, it makes sense to immediately provide statements about the domain and range of these properties– Immediately define the domain of properties

Page 21: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Define Facets

• Define extra conditions over properties– Cardinality restrictions– Required values– Relational characteristics

• symmetry, transitivity, inverse properties, functional values

Page 22: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Define Instances

• Filling the ontologies with such instances is a separate step

• Number of instances >> number of classes

• Thus populating an ontology with instances is not done manually – Retrieved from legacy data sources (DBs)– Extracted automatically from a text corpus

Page 23: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Check for Anomalies

• Test whether the ontology is consistent– For this, one must have a notion of consistency in the

language

• Examples of common inconsistencies – incompatible domain and range definitions for

transitive, symmetric, or inverse properties

– cardinality properties

– requirements on property values can conflict with domain and range restrictions

Page 24: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

Protégé

• Java based Ontology editor• It supports Protégé-Frames and OWL as

modeling languages– Frames is based on Open Knowledge Base

Connectivity protocol (OKBC)

• It exports into various formats, including (Semantic) Web formats

• Let’s try it

Page 25: Part 5: Ontologies. Logic and Ontologies Up to now we have studied Logic Languages for Knowledge Representation and Reasoning: –in both static and dynamic

The newspaper example (part):Thing

Author Person

Reporter

Employee

Salesperson

Article

Manager

Advertisement

Content

News Service

Editor

• Properties (slots)– Persons have names which are strings, phone number, etc– Employees (further) have salaries that are positive numbers– Editor are responsible for other employees– Articles have an author, which is an instance of Author, and possibly

various keywords• Constraints

– Each article must have at least two keywords– The salary of an editor should be greater than the salary of any employee

which the editor is responsible for