ontology & owl semantic web - fall 2005 computer engineering department sharif university of...

49
Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Upload: mariah-pearson

Post on 03-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Ontology & OWL

Semantic Web - Fall 2005

Computer Engineering Department

Sharif University of Technology

Page 2: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Outline Introduction & Definitions Ontology Languages OWL

Page 3: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Where does it come from?ontology n.

1692; lat. phil. onto- “being” + -logia “study of”

Philosophy The study of what is, what has to be true for

something to exist, the kinds of things that can exist

AI and computer science Co-opted the term. Something exists if it

can be represented, described, defined (in a formal, hence, machine-interpretable way).

Page 4: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Ontologies

Page 5: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Ontologies (contd.) Ontologies are about vocabularies and their

meanings, with explicit, expressive, and well-defined semantics, possibly machine-interpretable.

“Ontology is a formal specification of a conceptualization.” Gruber, 1993

Main elements of an ontology: Concepts Relationships

Hierarchical Logical

Properties Instances (individuals)

Page 6: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

A Definition Informal

Terms from a specific domain uniquely defined, usually via natural language

definitions May contain additional semantics in the form of

informal relations machine-processing is difficult Examples

Controlled vocabulary Glossary Thesaurus

Page 7: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

A Definition Formal

Domain-specific vocabulary Well-defined semantic structure

Classes/concepts/types E.g., a class { Publication } represents all publications E.g., a class { Publication } can have subclasses { Newspaper },

{ Journal } Instances/individuals/objects

E.g., the newspaper Le Monde is an instance of the class { Newspaper }

Properties/roles/slots Data

E.g., the class { Publication } and its subclasses { Newspaper }, { Journal } have a data property { numberOfPages }

Object E.g., the class { Publication } and its subclasses { Newspaper

}, { Journal } have an object property { publishes } Is machine-processable

Page 8: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Ontologies in the Semantic Web Provide shared data structures to

exchange information between agents Can be explicitly used as annotations in

web sites Can be used for knowledge-based

services using other web resources Can help to structure knowledge to

build domain models (for other purposes)

Page 9: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Meaning is in Connections

W i

n

e

i

s

m

a

d

e

f r

o

m

G

r

a

p

e

Wine

is made from

Grape

Page 10: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

For machines...

<Sentence><Subject>

</Subject><Verb>

</Verb><Object>

</Object></Sentence>

XML document

<><>

</><>

</><>

</></>

We are defining the structure of document by XML

The meaning of the document is not defined. Machines cannot understand it.

but now the meaning of the structure is not defined.

Page 11: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

<><>

</><>

</><>

</></>

Ontology gives the meaning...

DocumentOntology

Natural Language

Page 12: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Why develop ontologies? To share knowledge

E.g., using an ontology for integrating terminologies

To reuse domain knowledge E.g., geography ontology

To make domain assumptions explicit Facilitate knowledge management Enable new users to learn about the domain

To distinguish domain knowledge from operational knowledge e.g., biblio metadata

Page 13: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

What they are good for Informal Controlled vocabulary

Beginnings of interoperability Upper-level structures for extending further

E.g., AGRIS/CARIS categorization Browsing support

E.g., IRS information search Search

Limited query expansion disambiguation

e.g., “Jordan” as a name of Basket-ball player and name of a country

Page 14: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

What they are good for Formal

Search Concept-based query User uses own words, language

Related terms Intelligent query expansion: “fishing vessels in

China” expands to “fishing vessels in Asia” Consistency checking

e.g., “Goods” has a property called “price” that has a value restriction of number

Interoperability support Terms defined in expressive ontologies allow for

mapping precisely how one term relates to another

Page 15: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Ontology Languages Graphical notations Semantic networks Topic maps UML RDF

Logic based Description Logics (e.g., OIL, DAML+OIL, OWL) Rules (e.g., RuleML, LP/Prolog) First Order Logic

Page 16: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Ontology Languages• RDF(S) (Resource Description Framework

(Schema))• OIL (Ontology Interchange Language)• DAML+OIL (DARPA Agent Markup

Language + OIL)• OWL (Ontology Web Language)• XOL (XML-based Ontology Exchange

Language)• SHOE (Simple HTML Ontology Extension)• OML (Ontology Markup Language)

Page 17: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Many languages use object oriented model:

Objects/Instances/Individuals Elements of the domain of discourse Equivalent to constants in FOL

Types/Classes/Concepts Sets of objects sharing certain characteristics Equivalent to unary predicates in FOL and Concepts in

DL

Relations/Properties/Roles Sets of pairs (tuples) of objects Equivalent to binary predicates in FOL and Roles in DL

Object oriented model

Page 18: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

OWL (Ontology Web Language) OWL is now a W3C Recommendation

The purpose of OWL is identical to RDFS i.e. to provide an XML vocabulary to define classes, properties and their relationships. RDFS enables us to express very rudimentary

relationships and has limited inferencing capability. OWL enables us to express much richer relationships,

thus yielding a much enhanced inferencing capability.

The benefit of OWL is that it facilitates a much greater degree of inference than you get with RDF Schema.

Page 19: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Origins of OWL

RDFRDF

DAML+OILDAML+OIL

DARPA Agent Markup Language

A W3C Recommendation

OILOIL

OWLOWL

All influenced by RDF

Ontology Inference Layer

EU/NSF Joint Ad hoc Committee

DAMLDAML

OWL LiteOWL DL OWL Full

Page 20: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

OWL OWL and RDF Schema enable rich machine-processable

semantics

XML/DTD/XML Schemas

RDF Schema

OWL

Semantics

Syntax

<rdfs:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/></rdfs:Class>

<owl:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/></owl:Class>

RDFS

OWL

Page 21: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Why Build on RDF Provides basic ontological primitives

Classes and relations (properties) Class (and property) hierarchy

Can exploit existing RDF infrastructure

Provides mechanism for using ontologies RDF triples assert facts about resources Use vocabulary from DAML+OIL ontologies

Page 22: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

OWL Design Goals Shared ontologies Ontology evolution Ontology interoperability Inconsistency detection Expressivity vs. scalability Ease of use Compatibility with other standards Internationalization

Page 23: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Full: Very expressive, no computation guarantees

DL (Description Logic): Maximum expressiveness, computationally

complete

Lite: Simple classification hierarchy with simple constraints.

Versions of OWL Depending on the intended usage, OWL provides three

increasingly expressive sublanguages

OWL Full

OWL DL

OWL Lite

Page 24: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Comparison of versions Full:

We get the full power of the OWL language. It is very difficult to build a tool for this version. The user of a fully-compliant tool may not get a quick and

complete answer.

DL/Lite: Tools can be built more quickly and easily Users can expect responses from such tools to come

quicker and be more complete. We don't have access to the full power of the language.

Page 25: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Describing classes in OWLOWL vs. RDFS

OWL allows greater expressiveness Abstraction mechanism to group resources with

similar characteristics Much more powerful in describing constraints on

relations between classes Property transitivity, equivalence, symmetry, etc. …

Extensive support for reasoning

Page 26: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

OWL Ontologies What’s inside an OWL ontology

Classes + class-hierarchy Properties (Slots) / values Relations between classes

(inheritance, disjoints, equivalents) Restrictions on properties (type, cardinality) Characteristics of properties (transitive, …) Annotations Individuals

Reasoning tasks: classification,consistency checking

Page 27: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Classes What is a Class? e.g., person, pet, old a collection of individuals (object, things, . . . ) a way of describing part of the world an object in the world (OWL Full)

Page 28: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

owl:Class Sub class of Class in RDF Better to forget about classes of classes Top-most class: owl:Thing

<owl:Class rdf:ID=“Person"/><owl:Class rdf:ID=“Man">

<rdfs:subClassOf rdf:resource="#Person" />

</owl:Class>

Page 29: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Individuals Two equivalent declarations:

1. <Person rdf:ID=“Ganji" />

1. <owl:Thing rdf:ID=“Ganji" /> <owl:Thing rdf:about="#Ganji">

<rdf:type rdf:resource="#Person"/> </owl:Thing>

Page 30: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Properties What is a Property? e.g., has_father, has_pet, service_number a collection of relationships between

individuals (and data) a way of describing a kind of relationship

between individuals an object in the world (OWL Full)

Page 31: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

OWL PropertiesObject

Properties

Ana owns Cuba

Is range aliteral / typed value ?

then ERROR

Data typeProperties

Ana age 25

XML Schema data types supported DB people happy

Page 32: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Defining Properties ObjectProperty DatatypeProperty rdfs:subPropertyOf rdfs:domain rdfs:range

<owl:ObjectProperty rdf:ID="madeFromGrape"> <rdfs:domain rdf:resource="#Wine"/>

<rdfs:range rdf:resource="#WineGrape"/> </owl:ObjectProperty>

Page 33: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Describing classes in OWLComplex Classes

Union of classes (owl:unionOf) OR (A B)

Union of classes (owl:intersectionOf) AND (A B)

Complement (owl:complementOf) NOT

Enumeration (owl:oneOf)

Disjoint Classes (owl:disjointWith)

Page 34: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Describing classes in OWLProperty Restrictions

Defining a Class by restricting its possible instances via their property values

OWL distinguishes between the following two:Value constraintCardinality constraint

Page 35: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Describing classes in OWLRestrictions on Property Classes

Properties: allValuesFrom: rdfs:Class (lite/DL owl:Class) hasValue: specific Individual someValuesFrom: rdfs:Class (lite/DL owl:Class) minCardinality: xsd:nonNegativeInteger (in lite {0,1}) maxCardinality: xsd:nonNegativeInteger (in lite {0,1})

Page 36: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

What’s in OWL, but not in RDF Ability to be distributed across many

systems Scalable to Web needs Compatible with Web standards for: accessibility, and Internationalization

Open and extensible

Page 37: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Describing properties in OWLOWL vs. RDFS RDF Schema provides some of predefined

properties: rdfs:range used to indicate the range of values for a property. rdfs:domain used to associate a property with a class. rdfs:subPropertyOf used to specialize a property. …

OWL provides additional predefined properties: owl:cardinality (indicate cardinality) owl:hasValue (at least one of the specified property values) …

OWL provides additional property classes, which allow reasoning and inferencing: owl:FunctionalProperty owl:TransitiveProperty …

Page 38: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Describing properties in OWL

OWL Property Classesrdf:Property

owl:ObjectProperty owl:DatatypeProperty owl:FunctionalProperty owl:InverseFunctionalProperty

owl:SymmetricProperty owl:TransitiveProperty

An ObjectProperty relates one Resource to another Resource. A DatatypeProperty relates one Resource to a Literal - an XML

Schema data type.

Page 39: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Transitivity of propertiesX p1 YY p1 Z

implies X p1 Z

Transitivity existed already in RDF “subClassOf”, and ???

e.g. located_in, part_of

Page 40: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Symmetric propertiesX p1 Y

implies X p1 Y

e.g., =

Page 41: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Functional PropertiesX p1 Y X p1 Z

imply Z is the same as Y (they describe the same)

What if Y, Z where explicitly defined as “different” ?

Page 42: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Inverse Functional Properties

Y p1 AZ p1 A

imply Z is the same as Y(they describe the same)

What if Y, Z where explicitly defined as “different” ?

Page 43: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

OWL distributed“equivalent class”

“equivalent Property”

Guitar

Guitarra

Internationalization standards ?

Page 44: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Complex Classes

Male Students Married Female

Professors

Married Female Students

Divorced

Female

Human

Student

MarriedProfessor

Minority Students example

Page 45: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

Disjoint Classes Married disjoint with: Divorced Widowed Single

Are “Divorced” and “Single” disjoint ?

Married

WidowedDivorced Single

Page 46: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

OWL Cardinality min Cardinality max Cardinality

“Cardinality” When min = max

has Value belongs to the class if it has the value

Page 47: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

An Example OWL ontology<owl:Class rdf:ID=“Person” /><owl:Class rdf:ID=“Man”>

<rdfs:subClassOf rdf:resource=“#Person” /><owl:disjointWith rdf:resource=“#Woman” />

</owl:Class><owl:Class rdf:ID=“Woman”>

<rdfs:subClassOf rdf:resource=“#Person” /><owl:disjointWith rdf:resource=“#Man” />

</owl:Class><owl:Class rdf:ID=“Father”>

<rdfs:subClassOf rdf:resource=“Man” /><owl:Restriction owl:minCardinality="1">

<owl:onProperty rdf:resource="#hasChild" /></owl:Restriction>

</owl:Class><owl:ObjectProperty rdf:ID=“hasChild">

<rdfs:domain rdf:resource="#Parent" /><rdfs:range rdf:resource="#Person" />

</owl:ObjectProperty>

Page 48: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

References http://www.w3.org/TR/owl-ref/ Chapter 8 of the book

Page 49: Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology

The End