Ontologies Part 1

download Ontologies Part 1

of 55

Transcript of Ontologies Part 1

  • 8/4/2019 Ontologies Part 1

    1/55

    Dr. Hoang Huu Hanh, SoST DoIT, HUSC

    hanh-at-hueuni.edu.vn

  • 8/4/2019 Ontologies Part 1

    2/55

    2

  • 8/4/2019 Ontologies Part 1

    3/55

    3

  • 8/4/2019 Ontologies Part 1

    4/55

    IntroductiontoOntologies

    OntologyEngineering

    4

  • 8/4/2019 Ontologies Part 1

    5/55

    Section1

  • 8/4/2019 Ontologies Part 1

    6/556

    OntologyinPhilosophy: Themetaphysicalstudyofthenatureofbeing

    andexistence

    OntologyinArtificialIntelligence:

    asharedandcommonunderstandingofsomedomainthatcanbecommunicatedbetweenpeopleandapplicationsystems (Gruber)

  • 8/4/2019 Ontologies Part 1

    7/55

    Ontology(languages)fortheSemanticWeb:

    Weaimata(XMLbased)languagetoformallydescribeconcepts,instances,relationsandaxioms,i.e.data+structureinordertoenablemachineprocessablereasoningonand

    exchangeofdata.

    Knowledgerepresentation,exchange,combination(inferenceofnewknowledge!)

    7

  • 8/4/2019 Ontologies Part 1

    8/55

    Ontologiesarecontenttheoriesaboutthesortsof

    objects,propertiesofobjects,andrelations

    betweenobjectsthatarepossibleinaspecifieddomainofknowledge.

    8

  • 8/4/2019 Ontologies Part 1

    9/55

    OntologyasvocabularyOntologyisarepresentationvocabulary,oftenspecializedtosomedomainorsubjectmatter.

    OntologyascontenttheoryThemaincontributionofontologyistoidentifyspecificclassesofobjectsandrelationsthatexistinsomedomain.

    9

  • 8/4/2019 Ontologies Part 1

    10/55

    Studer(98): Formal,explicitspecificationofasharedconceptualization

    Machine

    readable

    Concepts,properties,functions,axiomsareexplicitlydefined

    Consensual

    knowledge

    Abstractmodelofsomephenomenaintheworld

    10

  • 8/4/2019 Ontologies Part 1

    11/55

    Concepts:Classes+classhierarchy

    instances Properties:oftenalsocalledRolesorSlots

    labeledinstancevaluepairs Axioms/Relations:

    relations

    between

    classes

    (disjoint,

    covers) inheritance(multiple?defaults?)

    restrictionsonslots(type,cardinality)

    Characteristicsofslots(symm.,trans.,)

    reasoning

    tasks:

    Classification:Whichclassesdoesaninstancebelongto?

    Subsumption:Doesaclasssubsumeanotherone?

    Consistencychecking:Isthereacontradictioninmyaxioms/instances?

    11

  • 8/4/2019 Ontologies Part 1

    12/55

    Ontologicalanalysisclarifiesthestructureof

    knowledge.

    Ontologiesenableknowledgesharing.

    12

  • 8/4/2019 Ontologies Part 1

    13/55

    Welldesigned

    Usefulandprovenmodellingprimitives Intuitivetohumanusers Expressiveenough

    Efficient

    and

    complete

    reasoning

    support Welldefined clearsyntax readontologies Formalsemantics understand(process)ontologies to

    facilitatemachineinterpretationofthatsemantics Compatible Easymapping to/fromotherontologylanguages

    MaximumcompatibilitywithXMLandRDF(S)

    15

  • 8/4/2019 Ontologies Part 1

    14/55

    Section2

  • 8/4/2019 Ontologies Part 1

    15/55

    OntologyEngineering: Definingtermsinthe

    domainandrelationsamongthem Definingconceptsinthedomain(classes)

    Arranging

    the

    concepts

    in

    a

    hierarchy

    (subclass

    superclasshierarchy)

    Definingwhichattributesandproperties (slots)

    classes

    can

    have

    and

    constraints

    on

    their

    values Definingindividuals andfillinginslotvalues

    17

  • 8/4/2019 Ontologies Part 1

    16/55

    Screenshotsinfurtherexamplesarefrom

    Protg,which:

    isagraphicalontologydevelopmenttool

    supportsarichknowledgemodel isopensourceandfreelyavailable

    (http://protege.stanford.edu/)

    18

  • 8/4/2019 Ontologies Part 1

    17/55

    Whatisthedomainthattheontologywillcover? Forwhatwearegoingtousetheontology? Forwhattypesofquestionstheinformationin

    theontologyshouldprovideanswers

    (competencyquestions)?

    Answerstothesequestionsmaychangeduringthelifecycle

    19

  • 8/4/2019 Ontologies Part 1

    18/55

    20

    French winesandwine regions

    Californiawines and

    wine regions

    Which wineshould

    I serve withseafood

    today? A sharedONTOLOGY

    of

    wine and food

  • 8/4/2019 Ontologies Part 1

    19/55

    WhichwinecharacteristicsshouldIconsider

    whenchoosingawine? IsBordeauxaredorwhitewine?

    Does

    Cabernet

    Sauvignon

    go

    well

    with

    seafood? Whatisthebestchoiceofwineforgrilledmeat? Whichcharacteristicsofawineaffectits

    appropriatenessforadish? Doesaflavororbodyofaspecificwinechange

    withvintageyear?

    21

  • 8/4/2019 Ontologies Part 1

    20/55

    wine,grape,winery,location,...winecolor,winebody,wineflavor,sugarcontent,...

    whitewine,redwine,Bordeauxwine,...food,seafood,fish,meat,vegetables,cheese,...

    22

  • 8/4/2019 Ontologies Part 1

    21/55

    Aclassisaconcept inthedomain aclassofwines

    aclassofwineries

    a

    class

    of

    red

    wines

    Aclassisacollection ofelements(instances

    ofclasses)withsimilarproperties

    23

  • 8/4/2019 Ontologies Part 1

    22/55

    Classesusuallyconstituteataxonomichierarchy (a

    subclasssuperclass hierarchy) AclasshierarchyisusuallyanISAhierarchy:

    aninstanceofasubclassisaninstanceofasuperclass Ifyouthinkofaclassasaset ofelements,a

    subclassisasubset

    24

  • 8/4/2019 Ontologies Part 1

    23/55

    AppleisasubclassofFruit

    Everyappleisafruit RedwinesisasubclassofWine

    Everyredwineisawine ChiantiwineisasubclassofRedwine

    EveryChiantiwineisaredwine

    25

  • 8/4/2019 Ontologies Part 1

    24/55

    topdown definethemostgeneralconcepts

    firstandthenspecializethem bottomup definethemostspecific

    conceptsandthenorganizetheminmoregeneralclasses

    combination definethemoresalient

    concepts

    first

    and

    then

    generalize

    and

    specializethem

    27

  • 8/4/2019 Ontologies Part 1

    25/55

    Classes(andslots)usuallyhave

    documentation

    Describingtheclassinnaturallanguage

    Listingdomainassumptionsrelevanttotheclassdefinition

    Listingsynonyms

    Documentingclassesandslotsisas

    importantasdocumentingcomputercode!

    28

  • 8/4/2019 Ontologies Part 1

    26/55

    Slotsinaclassdefinitiondescribeattributes

    ofinstancesoftheclassandrelationstoother

    instances

    Eachwinewillhavecolor,sugarcontent,producer,etc

    29

  • 8/4/2019 Ontologies Part 1

    27/55

    Typesofproperties intrinsicproperties:flavor andcolor ofwine extrinsicproperties:name andprice ofwine

    parts: ingredients inadish

    relationstootherobjects:producer ofwine(winery)

    Simpleandcomplexproperties simpleproperties(attributes):containprimitivevalues

    (strings,numbers)

    complexproperties:contain(orpointto)otherobjects

    (e.g.,awineryinstance)

    30

  • 8/4/2019 Ontologies Part 1

    28/55

    31

    (in

    Protg

    2000)

  • 8/4/2019 Ontologies Part 1

    29/55

    Asubclassinheritsalltheslots fromthesuperclassIfawinehasanameandflavor,aredwinealsohasanameandflavor

    Ifaclasshasmultiple superclasses,itinherits

    slotsfromallofthemPortisbothadessertwineandaredwine.Itinheritssugarcontent:highfromtheformerandcolor:redfromthelatter

    32

  • 8/4/2019 Ontologies Part 1

    30/55

    Propertyconstraints(facets)describeorlimit

    thesetofpossiblevaluesforaslot

    ThenameofawineisastringThewineproducerisaninstanceofWineryAwineryhasexactlyonelocation

    33

  • 8/4/2019 Ontologies Part 1

    31/55

    34

    Slot

    cardinality the

    number

    of

    values

    a

    slot

    has Slotvaluetype thetypeofvaluesaslothas

    Minimumandmaximum value arangeofvaluesforanumericslot

    Default value thevalueaslothasunless

    explicitlyspecifiedotherwise

  • 8/4/2019 Ontologies Part 1

    32/55

    Minimumcardinality Minimumcardinality1meansthattheslotmusthavea

    value(required)

    Minimumcardinality0meansthattheslotvalueis

    optional

    Maximumcardinality

    Maximum

    cardinality

    1means

    that

    the

    slot

    can

    have

    at

    mostonevalue(singlevaluedslot)

    Maximumcardinalitygreaterthan1meansthattheslot

    canhavemorethanonevalue(multiplevaluedslot)

    35

  • 8/4/2019 Ontologies Part 1

    33/55

    String:astringofcharacters(ChteauLafite)

    Number:anintegerorafloat(15,4.5) Boolean:atrue/falseflag Enumeratedtype:alistofallowedvalues(high,

    medium,low) Complextype:aninstanceofanotherclass Specifytheclasstowhichtheinstancesbelong

    TheWineclassisthevaluetypefortheslotproducesattheWineryclass

    36

  • 8/4/2019 Ontologies Part 1

    34/55

    Domain ofaslot theclass(orclasses)that

    havetheslot

    Moreprecisely:class(orclasses)instancesof

    whichcanhavetheslot Range ofaslot theclass(orclasses)to

    whichslotvaluesbelong

    37

  • 8/4/2019 Ontologies Part 1

    35/55

    Asubclassinherits alltheslotsfromthesuperclass

    Asubclasscanoverride thefacetstonarrowthe

    listofallowedvalues

    Makethecardinalityrangesmaller

    Replaceaclassintherangewithasubclass

    38

    Wine

    Frenchwine

    Winery

    Frenchwinery

    is-a is-a

    producer

    producer

  • 8/4/2019 Ontologies Part 1

    36/55

    Createaninstanceofaclass

    Theclassbecomesadirecttype oftheinstance

    Anysuperclassofthedirecttypeisatype oftheinstance

    Assignslotvaluesfortheinstanceframe

    Slotvaluesshouldconformtothefacetconstraints

    Knowledgeacquisitiontoolsoftencheckthat

    39

  • 8/4/2019 Ontologies Part 1

    37/55

    40

  • 8/4/2019 Ontologies Part 1

    38/55

    Thethingstoremember:

    Thereisnosinglecorrectclasshierarchy

    Buttherearesomeguidelines

    Thequestiontoask:Iseachinstanceofthesubclassisaninstanceofits

    superclass?

    41

  • 8/4/2019 Ontologies Part 1

    39/55

    Theisarelationshipistransitive:

    BisasubclassofA

    CisasubclassofB

    CisasubclassofA Adirectsuperclass ofaclassisitsclosest

    superclass

    42

  • 8/4/2019 Ontologies Part 1

    40/55

    43

    A

    class

    can

    have

    more

    than

    onesuperclass

    Asubclassinheritsslotsand

    facetrestrictionsfromalltheparents

    Differentsystemsresolve

    conflictsdifferently

  • 8/4/2019 Ontologies Part 1

    41/55

    Classesaredisjoint iftheycannothavecommoninstances Disjointclassescannothaveanycommonsubclasses either

    Redwine,Whitewine,Roswinearedisjoint

    DessertwineandRedwinearenotdisjoint

    44

    Wine

    Redwine Ros

    wineWhitewine

    Dessertwine

    Port

  • 8/4/2019 Ontologies Part 1

    42/55

    Danger

    of

    multiple

    inheritance:cyclesinthe

    classhierarchy ClassesA,B,andChave

    equivalentsetsofinstances

    Bymanydefinitions,A,B,andCarethusequivalent

    45

  • 8/4/2019 Ontologies Part 1

    43/55

    46

    All

    the

    siblings in

    the

    class

    hierarchymustbeatthe

    samelevelofgenerality Comparetosectionand

    subsectionsinabook

  • 8/4/2019 Ontologies Part 1

    44/55

    47

    If

    a

    class

    has

    only

    one

    child,

    theremaybeamodeling

    problem

    IftheonlyRedBurgundywehaveisCtesdOr,why

    introducethesubhierarchy?

    Comparetobulletsinabulletedlist

  • 8/4/2019 Ontologies Part 1

    45/55

    48

    If

    a

    class

    has

    more

    thanadozenchildren,additional

    subcategoriesmaybenecessary

    However,ifnonatural

    classificationexists,

    thelonglistmaybemorenatural

  • 8/4/2019 Ontologies Part 1

    46/55

    49

    Awineisnotakindofwines

    Awineisaninstance ofthe

    classWinesClass

    Instance

    instance-of

  • 8/4/2019 Ontologies Part 1

    47/55

    Classesrepresentconcepts inthedomain,nottheir

    names Theclassnamecanchange,butitwillstillreferto

    thesameconcept

    Synonymnames forthesameconceptarenotdifferentclasses

    Manysystemsallowlistingsynonymsaspartoftheclassdefinition

    50

  • 8/4/2019 Ontologies Part 1

    48/55

    51

  • 8/4/2019 Ontologies Part 1

    49/55

    52

    Whendefiningadomainorrangeforaslot,findthe

    mostgeneralclass orclasses

    Considertheflavor slot Domain:Redwine,Whitewine,Roswine

    Domain:

    Wine Considertheproduces slotforaWinery:

    Range:Redwine,Whitewine,Roswine

    Range:Wine

    slotclass allowed values

    DOMAIN RANGE

  • 8/4/2019 Ontologies Part 1

    50/55

    Aclassandasuperclass

    replacewiththesuperclass

    Allsubclassesofaclass

    replacewiththesuperclass

    Mostsubclassesofa

    class

    consider

    replacingwiththesuperclass

    53

  • 8/4/2019 Ontologies Part 1

    51/55

    Maker

    andProducer

    areinverse

    slots

    54

  • 8/4/2019 Ontologies Part 1

    52/55

    Defaultvalue avaluetheslotgetswhenan

    instanceiscreated Adefaultvaluecanbechanged

    Thedefaultvalueisacommon valuefortheslot,butisnotarequiredvalue

    Forexample,thedefaultvalueforwinebody

    canbeFULL

    55

  • 8/4/2019 Ontologies Part 1

    53/55

    Anontologyshouldnotcontainall the

    possibleinformationaboutthedomain Noneedtospecializeorgeneralizemorethanthe

    application

    requires Noneedtoincludeallpossiblepropertiesofa

    class

    Onlythemostsalientproperties

    Onlythepropertiesthattheapplicationsrequire

    56

  • 8/4/2019 Ontologies Part 1

    54/55

    Ontologyofwine,food,andtheirpairingsprobably

    willnotinclude Bottlesize

    Labelcolor

    Myfavoritefoodandwine Anontologyofbiologicalexperimentswillcontain Biologicalorganism

    Experimenter IstheclassExperimenterasubclassofBiological

    organism?

    57

  • 8/4/2019 Ontologies Part 1

    55/55

    thispresentationisbasedontutorialsandpresentations:

    D.Lee,F.Harmelen,M.Arumugam,C.Goble,I.Horrocks,N.F.Noy,

    D.L.McGuinness,J.Broekstra,M.Klein,S.Decker,D.Fensel