<<

THE PURPOSE OF AN ONTOLOGY

• To provide a comprehensive description of a certain concept and its relations to other concepts in the same ontology or another ontology WHAT IS AN ONTOLOGY? • Usually an ontology is described as a tree and why should we use it? • But a network is better since more relations can be used

cc Per Flensburg 2 1 2

CLASSICAL EXAMPLE BUT WHAT ABOUT THIS?

Vehicle Vehicle

Land- Water- Land- Water- Airvehicles Airvehicles vehicles vehicles vehicles vehicles

Helicopters Airplanes Baloons Helicopters Airplanes Baloons

Propeller- Rocket- Jetplanes Passenger- Freight- Sports- Military- planes planes planes planes planes planes

Two Four Subsonic- Supersonic- One engine Reconnaissa Bomb- Pursuit- engines engines planes planes nceplanes planes planes

cc Per Flensburg 3 cc Per Flensburg 4 3 4 CONFUSING? CLASSICAL EXAMPLE Vehicle Travelling ground

• Every level is guided by a principle for distinguish between the Land- Water- Airvehicles objects below. vehicles vehicles • They seem not to be consistent. Lifting principle • This is hidden in a tree diagram, but in a network it can be Helicopters Airplanes Baloons described, since a node in a network has more than one Used for connection. Passenger- Freight- Sports- Military- planes planes planes planes • So let’s see what are the principles in our examples! Used for

Reconnaissa Bomb- Pursuit- nceplanes planes planes

cc Per Flensburg 5 cc Per Flensburg 6 5 6

BUT WHAT ABOUT THIS? CF A DATA MODEL

Vehicle Travelling ground Airplanes Object

Land- Water- Airvehicles vehicles vehicles Type of propelling Attribute Lifting principle The Helicopters Airplanes Baloons attributes Number of Attribute Propelling principle are the engines

Propeller- Rocket- Jetplanes principles Max planes planes Numbers velocity Attribute of engines Velocity for division! Two Four Subsonic- Supersonic- One engine Used for engines engines planes planes Attribute

The principles must be made explicit! cc Per Flensburg 7 cc Per Flensburg 8 7 8 THE DOMAIN OF THE DATA MODEL ONE SUGGESTION

Airplanes Civil version Military version Propeller Civil Military But what about airplanes airplanes Type of Rocket Propeller Propeller propelling the military use? Type of Type of Rocket Rocket Jet propelling propelling

Number of Jet Jet 1-8 engines Number of Number of 1-8 1-8 engines engines Subsonic Max Subsonic Subsonic velocity Max Max Supersonic velocity velocity Supersonic Supersonic Used for Passenger Used for Used for Passenger Reconaissance Freight Freight Bombing Sport Sport Pursuit Military Note: The data model is the same! cc Per Flensburg 9 cc Per Flensburg 10 9 10

DIFFERENCE BETWEEN THE SIMPLE DATA MODEL TWO VERSIONS

• The data model is the same M M Customer Order Parts • The content in the fields belongs to different contexts • Today super-sonic planes are always military planes • We have to describe the contexts in some way! This is in fact a short story saying ”Customers • NOTE: In my communication model I suggest storytelling! order Parts”. A further analysis and normalisation reveals the traditional data model on next slide! • In order to describe the contexts we need more sophisticated description techniques. • Semantic networks is a such group of descriptions

cc Per Flensburg 11 cc Per Flensburg 12 11 12 NORMALISED MODEL AIRPLANES

I 1 M M Civil Airplane has type Customer place Order airplanes

1 I has Military M has type M airplanes Part is on Orderline 1 M One airplane has type many civil airplanes. One customer places many orders. One order has One airplane has type many military airplanes many orderlines. One part is on many orderlines. The story should say something about the domain This makes no sense! we are modelling. It should be correct!

cc Per Flensburg 13 cc Per Flensburg 14 13 14

IT DOES NOT MAKE SENSE BECAUSE OF

• One plane can only be of one type! • In the model ”Airplane” is a superior class of ”civil airplane” HOW TO CREATE AN and ”military airplane” and this can not be modelled in a database. Or...? ONTOLOGY • The sets of attributes to civil and military airplanes are partly Based upon: Ontology Development 101: A Guide to Creating overlapping (inheritance!) Your First Ontology • So how do you tell a story about this?

cc Per Flensburg 15 15 16 ORIGIN OF THE ONTOLOGY AI AND ONTOLOGIES CONCEPT

1. From philosophy Will be discussed later • Explicit formal specifications of the terms in the domain and 2. From data base theory Was discusssed earlier relations among them (Gruber 1993) 3. From artificial intelligence • Synonyms: Taxonomy, thesaurus, word list 4. From systems integration Will be discussed later • Purpose: Make people understand what is written in the database or on the web page • The WWW Consortium (W3C) is developing the Resource Description Framework (Brickley and Guha 1999), a language for encoding knowledge on Web pages to make it understandable to electronic agents searching for information.

cc Per Flensburg 17 cc Per Flensburg 18 17 18

WHY DEVELOP AN FORMAL DEFINITION IN THIS ONTOLOGY? GUIDE • To share common understanding of the structure of • An ontology is a formal explicit description of concepts in a information among people or software agents domain of discourse (classes (sometimes called concepts)), • To enable reuse of domain knowledge properties of each concept describing various features and attributes of the concept (slots (sometimes called roles or • To make domain assumptions explicit properties)), and restrictions on slots (facets • To separate domain knowledge from the operational (sometimes called role restrictions)). knowledge (control and meta information) • An ontology together with a set of individual instances of • To analyse domain knowledge classes constitutes a knowledge base. In reality, there is a fine line where the ontology ends and the knowledge base begins.

cc Per Flensburg 19 cc Per Flensburg 20 19 20 TO DEVELOP AN ONTOLOGY EXAMPLE

• define classes in the ontology, • A class of wines represents all wines. Specific wines are • arrange the classes in a taxonomic (subclass–superclass) instances of this class. The Bordeaux wine I drank last week- hierarchy, end is an instance of the class of Bordeaux wines. • define slots and describing allowed values for these slots, • A class can have subclasses that represent concepts that are more specific than the superclass. For example, we can divide • fill in the values for slots for instances. the class of all wines into red, white, and rosé wines. • Alternatively, we can divide a class of all wines into sparkling This was exactly what we did in the airplane example! and non-sparkling wines • Here I will use French wines as example.

cc Per Flensburg 21 cc Per Flensburg 22 21 22

FRANCE DATA MODEL

M 1 Wine is made by Winery

M M

is of

1 1 Type Produces

Many wines is made by one winery. Many wineries produces one type. Many wines is of one type

cc Per Flensburg 23 cc Per Flensburg 24 23 24 INSTANCE BUT WHAT ABOUT

Chateux Lafite Chateux Lafite Rotschild Rotschild Rotschild is made by Rotschild is made by

is of is of

Bordeaux Produces Pauillac Produces

cc Per Flensburg 25 cc Per Flensburg 26 25 26

RESOLUTION AND YET MORE

Chateux Lafite is made by Rotschild Chateux Lafite Rotschild Rotschild Rotschild is made by

is of is of Pauillac grand vin Produces Pauillac Produces is of is of Mouton- Bordeaux Latour Bordeaux Rotschild

cc Per Flensburg 27 cc Per Flensburg 28 27 28 BORDEAUX MEDOC WINES WINE DISTRICTS

cc Per Flensburg 29 cc Per Flensburg 30 29 30

WINE ONTOLOGY NOTE:

• There is no one correct way to model a domain • Ontology development is necessarily an iterative process. • Concepts in the ontology should be close to objects (physical or logical) and relationships in your domain of interest. These are most likely to be nouns (objects) or verbs (relationships) in sentences that describe your domain.

Some classes, instances, and relations among them in the wine domain. We used black for classes and red for instances. Direct links represent slots and internal links such as instance-of and subclass-of. cc Per Flensburg 31 cc Per Flensburg 32 31 32 STEPS DOMAIN AND SCOPE

• Step 1. Determine the domain and scope of the ontology •What is the domain that the ontology will cover? • Step 2. Consider reusing existing ontologies •For what we are going to use the ontology? • Step 3. Enumerate important terms in the ontology •For what types of questions the information in the ontology • Step 4. Define the classes and the class hierarchy should provide answers? • Step 5. Define the properties of classes—slots •Who will use and maintain the ontology? • Step 6. Define the facets of the slots • Step 7. Create instances

cc Per Flensburg 33 cc Per Flensburg 34 33 34

EXAMPLE COMPETENCY QUESTIONS

• Which wine characteristics should I consider when choosing a • Domain: Representation of food and wines wine? • Application: Suggest good combinations of wines and food • Is Bordeaux a red or white wine? • If the ontology will be used to assist in natural language • Does Cabernet Sauvignon go well with seafood? processing of articles in wine magazines, it may be important to include synonyms • What is the best choice of wine for grilled meat? • If the ontology will be used to help restaurant customers • Which characteristics of a wine affect its appropriateness for decide which wine to order, we need to include retail-pricing a dish? information • Does a bouquet or body of a specific wine change with • If it is used for wine buyers in stocking a wine cellar, wholesale vintage year? pricing and availability may be necessary. • What were good vintages for Napa Zinfandel? cc Per Flensburg 35 cc Per Flensburg 36 35 36 REUSING EXISTING WINE ONTOLOGIES ONTOLOGIES

• Many ontologies are available in electronic form and can be • http://www.daml.org/ontologies/76 imported into an ontology-development environment • Gives names of classes and of properties • The formalism in which an ontology is expressed often does • http://www.dmoz.org/Home/Cooking/Beverages/Wine/ not matter, since many knowledge-representation systems can • import and export ontologies. http://www.dmoz.org/Regional/Europe/France/ Business_and_Economy/Shopping/Wine/Producers/ • Even if a knowledge-representation system cannot work directly with a particular formalism, the task of translating an • (http://www.ksl.stanford.edu/software/ontolingua/) seems not ontology from one formalism to another is usually not a to work None of them works! difficult one. • Let’s suppose we don’t have any

cc Per Flensburg 37 cc Per Flensburg 38 37 38

IMPORTANT TERMS IN THE DEFINE THE CLASSES AND ONTOLOGY THE CLASS HIERARCHY

• For example, important wine-related terms will include wine, • Top down grape, winery, location, a wine’s color, body, flavor • Bottom up and sugar content; different types of food, such as fish • Combination and red meat; subtypes of wine such as white wine, and so on. • Criteria: objects having independent existence rather than terms that describe these objects • Initially, it is important to get a comprehensive list of terms without worrying about overlap between concepts they represent, relations among the terms, or any properties that the concepts may have, or whether the concepts are classes or slots

cc Per Flensburg 39 cc Per Flensburg 40 39 40 cc Per Flensburg 42 41 42

DEFINE THE PROPERTIES EXAMPLE FROM THE PAPER

• Select properties among the terms already listed • Add properties you discover during the process • Add property for each relation

cc Per Flensburg 43 cc Per Flensburg 44 43 44 MY VERSION FACETS OF THE SLOT

Name of Values of • Restrictions of possible values such Wine property property • Cardinality Full Name • Value type (which can have additional restrictions) Medium Body • Instance defines a relation between classes Light • Range: Allowed classes for type ”instance”. Can have Flavour additional restrictions Maker Wineryname • Domain: The class to which a property is attached

Grape Grapename

Sugar

Year cc Per Flensburg 45 cc Per Flensburg 46 45 46

http://mysite.verizon.net/ DEFINE INSTANCES jflynn12/VisioOWL/Wine.jpg

• In the beginning more like a test • In the end the all instances of wines in the world is contained in the database • Depending on the purpose it could be every single bottle... • A attempt to define a partial ontology can be found in Disco • In the article they have used Protege, an open-source program for ontology engeneering

cc Per Flensburg 47 47 48 CREATING HIEARCHIES

• The class hierarchy represents an “is-a” or “kind-of” relation: a class A is a subclass of B if every instance of A is also an instance of B. • A single wine is not a subclass of all wines • Transitivity: If B is a subclass of A and C is a subclass of B, then C is a subclass of A • The name of a class may change if we choose a different terminology, but the class itself represents the objective reality in the world.

cc Per Flensburg 50 49 50

WHEN INTRODUCE A NEW HIERARCHY RULES CLASS

• All the siblings in the hierarchy (except for the ones at the • Subclasses of a class usually root) must be at the same level of generality. • have additional properties that the superclass does not have • If a class has only one direct subclass there may be a modeling • restrictions different from those of the superclass problem or the ontology is not complete. • participate in different relationships than the superclasses • If there are more than a dozen subclasses for a given class • then additional intermediate categories may be necessary Finally, we should not create subclasses of a class for each additional restriction. For example, we introduced the classes • Multiple inheritance: a class Portwine has two superclasses: Red wine, White wine, and Rose wine because this distinction Red wine and Dessert wine and inherits properties is a natural one in the wine world. We did not introduce from all of them classes for delicate wine, moderate wine, and so on

cc Per Flensburg 51 cc Per Flensburg 52 51 52 CLASS OR PROPERTY VALUE CLASS OR PROPERTY VALUE? (CON’T)?

• If the concepts with different slot values become restrictions • If a distinction is important in the domain and we think of the for different slots in other classes, then we should create a objects with different values for the distinction as different new class for the distinction. Otherwise, we represent the kinds of objects, then we should create a new class for the distinction in a slot value. distinction. • Ex: for the representation of wine, food, and their appropriate • Ex: red Merlots and white Merlots are really different combinations a red wine is very different from a white wine: it wines(made from the same grape) and if we are developing a is paired with different foods, has different properties, and so detailed ontology of wine, this distinction is important. on

cc Per Flensburg 53 cc Per Flensburg 54 53 54

CLASS OR INSTANCE? MORE ADVICES

• Individual instances are the most specific concepts • In chap 5 and 6 you can find more advices concerning represented in a knowledge base. properties and naming conventions. • Depends much on the context, for instance a restaurant might have to track the individual bottles’ • If concepts form a natural hierarchy, then we should represent them as classes • Ex: Wine regions usually form a hierarchy (But what about ”tabel wine”?)

cc Per Flensburg 55 cc Per Flensburg 56 55 56 HOMEWORK AND ASSIGNEMENT • Download Protege FINALLY • Try to develop a full ontology for single malt whisky from Islay in Scotland! There is no single correct ontology for any domain. Ontology • Links: design is a creative process and no two ontologies designed by • http://en.wikipedia.org/wiki/Single_malt_whisky different people would be the same • http://en.wikipedia.org/wiki/Islay

cc Per Flensburg 57 57 58