introduction to ontology

78
Introduction to Ontology Sudarsun S Director – Research Checktronix India Chennai 600010 แแแแแแแแแแแแแแแแแแแ แแแแแแแ แแแแแแแแแแแแแแ แแแแแแแแแแแแแแแแแแแแแแ แแแแแแแแแแแแแแแแ

Upload: kiri

Post on 22-Feb-2016

61 views

Category:

Documents


0 download

DESCRIPTION

Introduction to Ontology. Sudarsun S Director – Research Checktronix India Chennai 600010 แปลและเรียบเรียงโดย บรรเจิด วิโรจน์วุฒิกุล คณะวิทยาการคอมพิวเตอร์ มหาวิทยาลัยบูรพา. Ontology คืออะไร?. สาขาปรัชญา – แขนงหนึ่งของปรัชญา ที่ว่าด้วยธรรมชาติและองค์กรของความจริง . - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Introduction to Ontology

Introduction to Ontology

Sudarsun SDirector – ResearchChecktronix IndiaChennai 600010

แปลและเรยบเรยงโดย บรรเจด วโรจนวฒกล

คณะวทยาการคอมพวเตอร มหาวทยาลยบรพา

Page 2: Introduction to Ontology

Ontology คออะไร?

การศกษาเกยวกบการดำารงอย (ปรชญาวาดวยความจรงในธรรมชาต)

ทดลองหาคำาตอบของคำาถามทวา :อะไรคอคณลกษณะของการดำารงอย? ในทสดแลวดำารงอยอยางไร?

แบงแยกสายสงตางๆอยางไร?

– สาขาปรชญา แขนงหนงของปรชญา ทวาดวยธรรมชาตและองคกรของความ

จรง

Page 3: Introduction to Ontology

Ontology in Computers

Ontology คอ สงประดษฐทางวศวกรรม ทประกอบดวยคำาศพททจะอธบายถงขอบเขต (ของสงทเจาะจง)ขอมลจำาเพาะทชดเจน ของความหมายคำาศพทขอจำากดของการเพมความรใหมเขาไปในขอบเขต

ในอดมคตแลว an ontology ควรจะ : เขาถงความเขาใจทวไป ของขอบเขตทสนใจ เตรยมรปแบบ และ แบบจำาลองทเครองจกรจดการได

ของขอบเขตทสนใจ

Page 4: Introduction to Ontology

Example

คำาศพท และ ความหมาย (การนยาม)ชาง เปนสมาชกหนงของ สตวสตวกนพช เปนสมาชกของ สตว ซง กนเฉพาะพช หรอ

สวนหนงของพชชางโตเตมวย เปนสมาชกของ ชาง ซง มอายมากกวา 20

ปเบองหลงของความร/ขอจำากดบนขอบเขต (กฎเกณฑ

ทยอมรบกนทวไป)ชางโตเตมวย หนก อยางตำา 2000 กโลกรมชางทกตว เปน ชางแอฟรกน หรอ ชางอนเดย ไมม สงมชวตใด เปนไดทง สตวกนพช และ สตวกนเนอ

Page 5: Introduction to Ontology

Example Ontology (Protégé)

Page 6: Introduction to Ontology

What??

Page 7: Introduction to Ontology
Page 8: Introduction to Ontology

Why Ontology?

เพอแชรความเขาใจพนฐานของโครงสรางขอมล ระหวางคนและSoftware agents

เพอทำาใหนำาขอบเขตความรเดมกลบมาใชใหมไดเพอสรางขอบเขตทสมมตขนมาใหมความ

ชดเจนเพอแยกขอบเขตความรออกจากความรทวไปไดเพอวเคราะหขอบเขตของความร

Page 9: Introduction to Ontology

Few Applications

e-Science, ตวอยางในดาน Bioinformatics The Gene Ontology (GO) The Protein Ontology (MGED)

Databases Schema design and integration Query optimisation

User interfaces The Semantic Web & so-called Semantic Grid

Page 10: Introduction to Ontology

Importance towards E-Commerce

Taxonomies provide : เขามาควบคมในการใชคำาศพทรวมกน (search

engines, authors, users, databases, programs / ทก agent ใชภาษาเดยวกน)

Site ชวยเหลอดาน Organization และ Navigationถกกำาหนดใหเปนมาตรฐาน (เชน ตงไวทโซนซายของ

หลายๆเวปไซด) “Umbrella” ระดบโครงสรางทสงขน (เพอการ

Extension) ตวชวยคนหา (แถบชวยเหลอของ Yahoo!)Sense disambiguation

Page 11: Introduction to Ontology

Importance towards E-Commerce

ตรวจสอบความสอดคลองการทำาใหสมบรณสนบสนนการทำาใหขอมลในระบบตางๆพดคยกน

ได(Interoperability)สนบสนนองคประกอบภายนอก เปนโครงสราง, เปรยบเทยบเพอปรบปรงการคนหา

ขอมลGeneralization/ Specialization

Page 12: Introduction to Ontology

Observations

Ontologies อยางงาย สามารถสรางไดโดยไมตองมความชำานาญ โดยใช Verity’s Topic Editor, Collaborative Topic Builder,

GFP,Chimaeras, Protégé, OIL-ED,etc Ontologies สามารถสรางขนไดแบบกงอตโนมต

โดยอางองจากเวปไซด เชน yahoo!, Amazon, excite Semi-structured sites can provide starting points

Ontologies มการใชเพมขนอยางรวดเรว(โดยมธรกจเปนตวผลกดน) เวปไซดทางธรกจสวนมากใช เชน Amazon, Yahoo! Shopping ธรกจทเจรญรงเรองกำาลงสนใจ ภาษาทใชกำาลงเตบโต จำาพวก Markup Languages XML,RDF “Real” ontologies เหมาะสมทจะเปนศนยกลาง Application

Page 13: Introduction to Ontology

Implications & Need

ไวยกรณและความหมายของ Ontology Language (DAML+OIL)

ทรพยากรทใชในการสรางและบำารงรกษาของ Ontologies

ฝกฝน (Conceptual Modeling,การอางเหตผลของสงทเกยวของ, ……)

Page 14: Introduction to Ontology

Issues

การรวมมอ ระหวางกลมทเปดเผยขอมล การเชอมตอระหวางระบบหลายๆแหงเขาดวยกน วเคราะหและวนจฉย ประมาณ แบบฉบบ ความปลอดภย งายตอการใช การฝกหลากหลายระดบ / สนบสนนผใช กลวธนำาเสนอ วงจรชวต ความสามารถในการแพรขยายออก

Page 15: Introduction to Ontology

Chimaera

An interactive web-based tool aimed at supporting: วเคราะห Ontology (ความถกตอง, ความสมบรณ, ลกษณะ, …) Merging of ontological terms จากหลายแหลงเขาดวยกนได บำารงรกษา ontologies ตลอดเวลา การใหเหตผลของขอมลเขา

Features: multiple I/O languages, loading and merging into multiple namespaces, collaborative distributed environment support, integrated browsing/editing environment, extensible diagnostic rule language

ถกใชในดานการพาณชยและวชาการ แหลงขอมล: www.ksl.stanford.edu/software/chimaera

Page 16: Introduction to Ontology

Building Ontology

กำาหนด classesจดเตรยมใหอยในรป Taxonomic hierarchy

sub-class/super-class modelเตรยม slots และ facets สำาหรบ slotsกำาหนดคาสำาหรบ slots ในแตละกรณ

Page 17: Introduction to Ontology

Thumb-Rules

ไมมวธการทถกตองในการสรางขอบเขตมชองทางในการทำาไดเสมอวธการทดทสดขนอยกบการนำาไปใชและขยายตอกระบวนการทำาซำาแนวความคดใน Ontology คลายกบ

objects(รปธรรม/นามธรรม) และ relationships ในขอบเขตทสนใจObjects คอ คำานามทวไปRelationships คอ กรยาทวไปในประโยค

Page 18: Introduction to Ontology

Step 1: Domain & Scope

อะไรคอขอบเขตทสนใจ?อะไรคอจดประสงคของ Ontology น?อะไรคอสงคาดหวงของคำาถาม?ใครเปนผใชและบำารงรกษา Ontology ?ตวอยางคำาถาม:

ชางเปนสตวกนพชหรอสตวกนเนอ?ชางกนอะไรเปนอาหาร?ชางแอฟรกนมนสยเปนอยางไร?

Page 19: Introduction to Ontology

Step 2: Re-Use Existing Ontology

ถาเขากนได กสามารถใชไดแนนอนปญหาในการ merging Ontologies?

รปแบบขดแยงแนวคดเดยวกน, การนำาเสนอตางกน

Page 20: Introduction to Ontology

Step 3: Enumerate Terms

Terms คออะไร?Properties ของ terms คออะไร?Relationships ของ terms คออะไร?ตวอยาง:

Animal, elephant, lionความสง, นำาหนก, อาหารทกนชางกบควาญชาง, ชางผสมพนธกนเองได, ชางอย

รวมกนเปนกลม

Page 21: Introduction to Ontology

Step 4: Define Classes & Hierarchy

Top-Down Approach Bottom-Up Approach Mixed Object Oriented Programming Analogy อะไรทเราจะไดรบ?

การจดเรยง Hierarchical ของ concepts ถา class P is a super-class of class Q, และทกๆกรณ

ของ B คอ หนงในกรณของ P หมายความวา : class Q represents a “kind-of” P

Page 22: Introduction to Ontology

Step 5: Properties of Classes - Slots

“intrinsic” properties เชน softness of silk“extrinsic” properties เชน bike’s model nameParts, ถา object เปนรปแบบ Structured;

สามารถกำาหนดใหเปน physical และ abstact parts ได เชน: เวลาหากนชวงเชาของชาง

Relationships ระหวางสมาชกของ class เชน: ชาง กบ ควาญชาง, สามารถแสดงถงความสมพนธ

ระหวาง ชาง อางองถงทอยของชาง ผานทางควาญชางได

Page 23: Introduction to Ontology

Step 6: Define Slots

จำานวน values ของ Slot ตงคา วา slot ควรจะม values ไดกคา?

ใสคาของ Slot มคาอะไรทสามารถใสไดบาง? คามาตรฐานทวไป:

String Number Boolean Enumeration Instance

Page 24: Introduction to Ontology

Step 7: Create Instances

ยกตวอยางการสราง instance ชอ african_elephant ซงเปน instance ของ class elephantHigh : 400 cmWeight : 6,500 KgEat : fruit, leaf (instance of food class)Behavioer : aggressiveKind : Herbivore (instance of animal_type

class)

Page 25: Introduction to Ontology

Consistency Checks ??

ทำาใหแนใจวา Class hierarchy ถกตองสงทอยในระดบเดยวกนของ tree ควรจะม สงทวไป

คลายๆกนclasses ทมความหมายเหมอนกน แตแยกเปน

คนละ classตรวจความสมพนธ “is-a” และ “kind-of”สงทมากเกนไปหรอนอยเกนไป

Multiple Inheritance

Page 26: Introduction to Ontology

Consistency Checks ??

เราจะเพม class ใหมไดเมอไหร? การเพม Subclass ของ class โดยทวไปจะ

มคณสมบตเพมเตมท super-class ไมม มขอจำากดทแตกตางจาก super-class มการอางอง relationships มากกวาใน super-class ม

Class ใหม หรอ property-value ใหม? class “african_elephant” หรอ class “elephant” ทม property

type เปน “african” ขนอยกบจดมงหมายทเราสนใจ เปน Instance หรอ Class?

Individual Instances เปน การแสดงถงกรณเจาะจงในฐานความร ถา concept ทสนใจเกดจากการจำาแนกโดยธรรมชาต จะเปน

classes

Page 27: Introduction to Ontology

Limiting the Scope

ตองการทจะไมใสขอมลทเปนไปไดทงหมดทเกยวกบขอบเขต

ตองการทจะไมใสกรณทวไป หรอ กรณเฉพาะ มากไปกวาอะไรทเราตองการนำาไปใช

ตองการทจะไมใส properties ทเปนไปไดทงหมดและ สงทแตกตาง ในหม classes บน hierarchy

Page 28: Introduction to Ontology

Ontology Merging/Alignment

สงทตองการการชวยเหลอและคำาแนะนำาของของกระบวนการ เครองมอพเศษสำาหรบ ontology merging and

alignmentสงทตองการ (แตยงไมสามารถทำาได)

เครองทสามารถ merging and alignment ไดอตโนมตอยางสมบรณ

Page 29: Introduction to Ontology

Mapping, Merging, Alignment

Page 30: Introduction to Ontology

Approaches

การแกปญหาขดแยงหลงจาก merging ผลลพธโดยตรง เกดการปกคลมของขอมล ยากทจะทำาซำา

เปลยนรปกอนทำาการ merging กระบวนการสามารถทำาซำาได ไมเปนผลลพธโดยตรง

ใชเครองมอปรบโดยตรงใหเหมาะสม สามารถไดผลลพธโดยตรงจากการปรบเปลยน ยากทจะทำาซำา แตเปนไปได

Page 31: Introduction to Ontology

SMART Algorithm

Page 32: Introduction to Ontology

Merge Classes (contd..)

Page 33: Introduction to Ontology

Merge Classes (contd..)

Page 34: Introduction to Ontology

Suggestions (contd..)

Page 35: Introduction to Ontology

Source – Car Rental

Page 36: Introduction to Ontology

Source –Airline Reservation

Page 37: Introduction to Ontology
Page 38: Introduction to Ontology

Features

ผลทตอบสนองกบผใชคำาชแจงกระบวนการแกเมอเกดปญหา

ดแลรกษาจดทสนใจปรบปรงการใหขอแนะนำาสรางขอมลชวคราวเพอยดเวลาสำาหรบการแกปญหา

การสะกดรอยความสมพนธ เกบความสมพนธทอางองถง เกบขอมลอยางยอไว

Page 39: Introduction to Ontology

Ontology Languages - RDF

RDF คอ Resource Description Framework เปน W3C candidate recommendation

(http://www.w3.org/RDF RDF เปน graphical formalism (+XML syntax +

semantics) เพอเปนตวแทนขอมลทอธบายถงขอมลอกชดหนง เพออธบายถงความหมายของขอมลในสงทเครองจกรเขาใจได

RDFS extends RDF กบ “schema vocabulary”ตวอยางเชน Class, Property Type, subClassOf, subPropertyOf Range, domain

Page 40: Introduction to Ontology

RDF Syntax --Triples

Ex: Subject Ex: Object

Subject ObjectProperty

Ex: Property

Page 41: Introduction to Ontology

RDF Syntax --Triples

Ex: Subject Ex: Object

Subject ObjectProperty

Ex: Property

_: xxx

Page 42: Introduction to Ontology

RDF Syntax --Triples

Ex: Subject Ex: Object

Subject ObjectProperty

Ex: Property

_: xxx

Page 43: Introduction to Ontology

RDF Syntax --Triples

Ex: Subject Ex: Object

Subject ObjectProperty

Ex: Property

_: xxx _: yyy

Page 44: Introduction to Ontology

RDF Syntax --Triples

Ex: Subject Ex: Object

Subject ObjectProperty

Ex: Property

_: xxx _: yyy

<< plain litteral >>

Page 45: Introduction to Ontology

RDF Syntax --Triples

Ex: Subject Ex: Object

Subject ObjectProperty

Ex: Property

_: xxx _: yyy

<< plain litteral >>

<< lexical >>^^data type

Page 46: Introduction to Ontology

RDF Syntax -- Graph

_: xxx

Page 47: Introduction to Ontology

RDF Syntax -- Graph

_: xxx

<< Palani Ramasamy >>

Ex: name

Ex: Person

rdf: type

Page 48: Introduction to Ontology

RDF Syntax -- Graph

_: xxx

<< Palani Ramasamy >>

Ex: name

_: yyyEx: member-of

Ex: Person

rdf: type

Page 49: Introduction to Ontology

RDF Syntax -- Graph

_: xxx

<< Palani Ramasamy >>

Ex: name

_: yyyEx: member-of

Ex: Person

rdf: type

<< University of Madras >>

Ex: name

Ex: Organisation

rdf: type

Page 50: Introduction to Ontology

RDFS

Page 51: Introduction to Ontology

RDFS

RDFS vocabulary adds constraints on models, e.g.: x,y,z type(x,y) subClassOf(y,z) type(x,z)

Page 52: Introduction to Ontology

RDFS

RDFS vocabulary adds constraints on models, e.g.: x,y,z type(x,y) subClassOf(y,z) type(x,z)

Ex: Person Ex: Animalrdf: subClassof

Page 53: Introduction to Ontology

RDFS

RDFS vocabulary adds constraints on models, e.g.: x,y,z type(x,y) subClassOf(y,z) type(x,z)

Ex: Person Ex: Animalrdf: subClassof

Ex: John Ex: Personrdf: type

Page 54: Introduction to Ontology

RDFS

RDFS vocabulary adds constraints on models, e.g.: x,y,z type(x,y) subClassOf(y,z) type(x,z)

Ex: Person Ex: Animalrdf: subClassof

Ex: John Ex: Personrdf: type

Ex: Animalrdf: type

Page 55: Introduction to Ontology

Problems with RDFS

RDFS ออนในการทจะอธบายทรพยากรในรายละเอยดทเพยงพอ ไมมขอบงคบ ของการจำากดวง range และ domain

ไมสามารถบอกไดวา ขอบเขตของ hasChild คอ person เมอประยกตเปน person and elephant และเมอประยกตเปน elephants

ไมมขอจำากด existence/cardinality ไมสามารถบอกไดวา ทกๆกรณของ person ม 1 mother นนคอ mother

เปน 1 person เชนกน หรอ person ม 2 parents ไดอยางถกตอง ไมมคณสมบต transitive, inverse หรอ symmetrical

ไมสามารถบอกไดวา isPartOf คอคณสมบต transitive, isPartOf คอ inverse ของ isPartOf และ touches คอ symmetrical

ความยากในการจำาแนก เหตผลสนบสนน ไมม “native” reasoners สำาหรบ เหตผลทไมใชมาตรฐาน May be possible to reason via FO axiomatisation

Page 56: Introduction to Ontology

Axiomatisation

An Axiomatisation สามารถถกใชฝง RDFS ใน FOL, ตวอยาง: Triple x P y translated as holds2 (P,x,y) Axioms capture ในสวนความหมายของ language

ปญหาการ axiomatisations include

จะตองการ set ทใหญและซบซอน ของ axioms ยากทจะพสจนความหมายใหเปนการ captured อยางถกตอง Axiomatisation จะเพมภาระการคำานวณอยางมาก complexity

RDFS → undecidable (subset of) FOL ไมม interoperability นอกจาก ทกภาษาท axiomatised เชนเดยวกน

เชน C subClassOf D equivalent to แตตอง axiomatise เชน holds2(subClass, C, D)

Page 57: Introduction to Ontology

RDF to OWL

สองภาษาทถกพฒนาโดย extending(สวนหนงของ) RDF OIL : Ontology Inference Layer DAML-ONT : DARPA Agent Markup Language

ความพยายามMerged เพอสราง DAML+OIL Extends (“DL subset” of) RDF

DAML+OIL Web-Ontology(WebOnt) Working Group formed WebOnt group ถกพฒนาโดย OWL Language based

on DAML+OIL OWL language now a W3C Proposed

Recommendation

Page 58: Introduction to Ontology

Description Logics

ครอบครวหนงของ logic based Knowledge Representation formalisms สบทอดมาจาก semantic networks และ KL-ONE อธบายขอบเขตในรปแบบของ concepts(classes),

roles(properties, relationships) และ individuals มลกษณะเดนคอ

Formal semantics (แบบจำาลองอยางเปนแบบฉบบตามหลกทฤษฎ)

ตดสนใจไดในสวนทแยกจาก FOL มความเกยวของอยางใกลชดกบ Prepositional Model & Dynamic

Logics การจดเตรยมของ inference services

การตดสนใจใชกระบวนการสำาหรบการแกไขปญหา (ความพงพอใจ, การสมมตฐาน, ฯลฯ)

Implemented systems (highly optimized)

Page 59: Introduction to Ontology

DL Basics

Concept คอ สงทเทยบไดกบ unary predicates โดยทวไป, concepts จะเทากบ สตรทมตวแปรอสระ 1 ตว

Role คอ สงทเทยบไดกบ binary predicates โดยทวไป, roles จะเทากบ สตรทมตวแปรอสระ 2 ตว

Individual คอสงทเทยบไดกบ คาคงท Operators จำากดความไดวา :

ภาษาตดสนใจได และ ถาเปนไปได, มความซบซอนนอย ไมตองการทจะใชตวแปรอยางชดเจน

จำากดความจาก และ (ตดตอกนโดยตรงดวย < > และ [ ]) ลกษณะ เหมอนกบ การนบทสนกระชบวองไว

Page 60: Introduction to Ontology

DL System Architecture

Page 61: Introduction to Ontology

DL Family

ถกใชบอยสำาหรบ ใน transitive roles(R+) Additional letters บงบอกถง extensions อนๆ

ตวอยางเชน

+ R+ + role hierachy + inverse + QNR = is the basis for W3C’s OWL Web Ontology

Language OWL DL extended with nominal (นนคอ ) OWL Lite with only functional restrictions (น

นคอ )

Page 62: Introduction to Ontology

DL Knowledge Base

A TBox is a set of “schema” axioms(sentences) ตวอยาง

An ABox is a set of “data” axioms (ground facts) ตวอยาง

A Knowledge Base (KB) คอการรวมของ TBox บวก ABox

Page 63: Introduction to Ontology

DL Reasoning

W

J M

hasChildmarriedTo

HappyParrenthasChild

~Doctor

Page 64: Introduction to Ontology

DL Reasoning

ตวอยาง : KB:

W

J M

hasChildmarriedTo

HappyParrenthasChild

~Doctor

Page 65: Introduction to Ontology

DL Reasoning

ตวอยาง : KB:

W

J M

hasChildmarriedTo

HappyParrenthasChild

~Doctor

Page 66: Introduction to Ontology

DL Reasoning

ตวอยาง : KB:

W

J M

hasChildmarriedTo

HappyParrenthasChild

~Doctor

Page 67: Introduction to Ontology

DL Reasoning

ตวอยาง : KB:

W

J M

hasChildmarriedTo

HappyParrenthasChild

~Doctor, (Doctor _ hasChild.Doctor), hasChild.Doctor

Page 68: Introduction to Ontology

DL Reasoning

ตวอยาง : KB:

W

J M

hasChildmarriedTo

HappyParrenthasChild

~Doctor, (Doctor _ hasChild.Doctor), hasChild.Doctor

? Doctor

hasChild

Page 69: Introduction to Ontology

OWL

3 สายพนธ ของ OWL OWL full เปน union ของ OWL syntax และ RDF OWL DL ซงมขอบเขตใน FOL fragment ( DAML+OIL) OWL Lite คอ “simpler” subset ของ OWL DL

Semantic layering OWL DL OWL full ภายใน DL fragment

OWL DL พนฐานบน Description Logic ในความเปนจรง มคาเทยบไดกบ DL

OWL DL ผลประโยชนทไดจากการวจย DL เปนเวลาหลายป งายในการนยาม semantics Formal properties งายตอการเขาใจ (ความซบซอน, ความสามารถในการ

ตดสนใจ) รจก reasoning algorithms Implemented systems (ใชใหเหมาะสมไดด)

Page 70: Introduction to Ontology

OWL constructors

Page 71: Introduction to Ontology

OWL constructors

XMLS datatypes และ classes ใน P.C และ P.C ตวอยาง hasAge.nonNegativeInteger

Page 72: Introduction to Ontology

OWL constructors

XMLS datatypes และ classes ใน P.C และ P.C ตวอยาง hasAge.nonNegativeInteger

ไมมกฎเกณฑทซบซอน nesting ของ constructors ตวอยาง Person hasChild.Doctor hasChild.Doctor

Page 73: Introduction to Ontology

RDFS Syntax

Page 74: Introduction to Ontology

RDFS Syntax

Page 75: Introduction to Ontology

OWL Axioms

Page 76: Introduction to Ontology

OWL Axioms

Page 77: Introduction to Ontology

References

Page 78: Introduction to Ontology

Thanks

ตดตอผเขยนไดท [email protected]

Checktronix India Pvt Ltd, 9 Ramanathan Street, Kilpauk, Chennai 600010 Phone: 044 30570028-32ทปรกษาเรยบเรยงบทความ อ.ธวชชย เอยมไพ

โรจช