Ontology engineering

30
Ontology engineering Valen.na Tamma Based on slides by A. Gomez Perez, N. Noy, D. McGuinness, E. Kendal, A. Rector and O. Corcho

Transcript of Ontology engineering

Ontologyengineering

Valen.naTamma

BasedonslidesbyA.GomezPerez,N.Noy,D.McGuinness,E.Kendal,A.RectorandO.Corcho

Summary

•  Stepsofontologydesign– Analysisandrequirements;

– Determinescope;– Considerreuse;– Enumerateterms;

– Defineclasses;

53

Extendtheconcepts:“Laddering”•  Takeagroupofthingsandaskwhattheyhaveincommon–  Thenwhatother‘siblings’theremightbe

•  e.g.–  Plant,AnimalLivingThing

•  MightaddBacteriaandFungibutnotnow

–  Cat,Dog,Cow,PersonMammal•  OthersmightbeGoat,Sheep,Horse,Rabbit,…

–  Cow,Goat,Sheep,HorseHoofedanimal(“Ungulate”)•  Whatothersarethere?Dotheydivideamongstthemselves?

– Wild,Domes.cDemoes.ca.on•  Whatotherstates–“Feral”(domes.creturnedtowild)

54

Choosesomemainaxes

•  Addabstrac.onswhereneeded– e.g.“Livingthing”

•  iden.fyrela.ons(thisfeedsintothenextstep)– e.g.“eats”,“owns”,“parentof”

•  Iden.fydefinablethings– e.g.“child”,“parent”,“Mother”,“Father”

•  Thingswhereyoucansayclearlywhatitmeans–  Trytodefineadogprecisely–verydifficult

»  A“naturalkind”

•  makenamesexplicit

55

Example

•  LivingThing–  Animal

•  Mammal–  Cat–  Dog–  Cow–  Person

•  Fish–  Carp–  Goldfish

–  Plant•  Tree•  Grass•  Fruit

•  Modifiers–  domes.c

•  pet•  Farmed

–  Drac–  Food

–  Wild–  Health

•  healthy•  sick

–  Sex•  Male•  Female

–  Age•  Adult•  Child

  Definable   Carinvore   Herbivore   Child   Parent   Mother   Father   Food Animal   Draft Animal

  Relations   eats   owns   parent-of   …

56

Iden.fyself‐standingen..es

•  Thingsthatcanexistonthereown– People,animals,houses,ac.ons,processes,…

•  Roughlynouns

•  Modifiers– Thingsthatmodify(“inhere”)inotherthings

•  Roughlyadjec.vesandadverbs

57

Reorganiseeverythingbut“definable”thingsintopuretrees–thesewillbethe“primi.ves”

•  Self_standing–  LivingThing

•  Animal

–  Mammal»  Cat»  Dog»  Cow»  Person»  Pig

–  Fish»  Carp

Goldfish

•  Plant–  Tree–  Grass–  Fruit

•  Modifiers–  Domes.ca.on

•  Domes.c•  Wild

–  Use•  Drac•  Food•  pet

–  Risk•  Dangerous•  Safe

–  Sex•  Male•  Female

–  Age•  Adult•  Child

  Definables   Carnivore   Herbivore   Child   Parent   Mother   Father   Food Animal   Draft Animal

  Relations   eats   owns   parent-of   …

58

Commentscanhelptoclarify

•  Self_standing–  LivingThing

•  Animal

–  Mammal»  Cat»  Dog»  Cow»  Person»  Pig

–  Fish»  Carp

Goldfish

•  Plant–  Tree–  Grass–  Fruit

–  Abstractancestorconceptincludingalllivingthings–restricttoplantsandanimalsfornow

Classinheritance•  Classesareorganizedintosubclass‐superclass(orgeneraliza.on‐

specializa.on)

Hierarchies:•  Classesare“is‐a”relatedifaninstanceofthesubclassisan

instanceofthesuperclass–  Classesmaybeviewedassets–  Subclassesofaclassarecomprisedofasubsetofthesuperset

•  Examples–  MammalisasubclassofAnimal–  Everypenguinisabirdoreveryinstanceofapenguin(likeTweetyisan

instanceofbird

–  DracanimalisasubclassofAnimal

Levelsintheclasshierarchy

•  Differentmodesofdevelopment–Top‐down‐definethemostgeneralconceptsfirstandthenspecializethem–  Bokom‐up‐definethemostspecificconceptsandthenorganizetheminmoregeneralclasses

–  Combina.on(typical–breadthatthetoplevelanddepthalongafewbranchestotestdesign)

•  ClassinheritanceisTransi.ve–AisasubclassofB–BisasubclassofC–thereforeAisasubclassofC

Levelsintheclasshierarchy

Middlelevel

Toplevel

Bo,omlevel

OntologydesignprocessRequirement

anddomainanalysis

Determinescope

Considerreuse

Enumerateterms

Defineclasses

Defineproper.es

Defineconstraints

AddInstances

Defineproper.es

•  Oceninterleavedwiththepreviousstep•  Proper.es(orrolesinDL)describetheakributesofthemembersofaclass

•  Theseman.csofsubClassOfdemandsthatwheneverAisasubclassofB,everypropertystatementthatholdsforinstancesofBmustalsoapplytoinstancesofA–  Itmakessensetoakachproper.estothehighestclassinthehierarchytowhichtheyapply

Defineproper.es

•  Typesofproper.es–“intrinsic”proper.es:flavorandcolorofwine–“extrinsic”proper.es:nameandpriceofwine–parts:ingredientsinadish–rela.onstootherobjects:producerofwine(winery)

•  Theyarerepresentedbydataandobjectproper.es–simple(datatype)containprimi.vevalues(strings,numbers)–complexproper.escontainotherobjects(e.g.,awineryinstance)

65

Modifiersandrela.ons

•  Modifiers–  Domes.ca.on

•  Domes.c•  Wild

–  Use•  Drac•  Food•  pet

–  Risk•  Dangerous•  Safe

–  Sex•  Male•  Female

–  Age•  Adult•  Child

  Relations   eats   owns   parent-of   …

OntologydesignprocessRequirement

anddomainanalysis

Determinescope

Considerreuse

Enumerateterms

Defineclasses

Defineproper.es

Defineconstraints

AddInstances

67

Iden.fythedomainandrangeconstraintsforproper.es

•  AnimaleatsLiving_thing–  eatsdomain:Animal;

range:Living_thing

•  PersonownsLiving_thingexceptperson–  ownsdomain:Person

range:Living_thing&notPerson

•  Living_thingparent_ofLiving_thing–  parent_of:domain:Living_thing

range:Living_thing

68

Ifanythingisusedinaspecialway,addatextcomment

•  AnimaleatsLiving_thing–  eatsdomain:Animal;

range:Living_thing

—  ignoredifferencebetweenpartsoflivingthingsandlivingthingsalsoderivedfromlivingthings

69

Fordefinablethings•  Paraphraseandformalisethedefini.onsintermsofthe

primi.ves,rela.onsandotherdefinables.

•  Noteanyassump.onstoberepresentedelsewhere.

– Addascommentswhenimplemen.ng

•  “A‘Parent’isananimalthatistheparentofsomeotheranimal”(Ignoreplantsfornow)–  Parent=

Animalandparent_ofsomeAnimal

•  “A‘Herbivore’isananimalthateatsonlyplants”(NBAllanimalseatsomelivingthing)–  Herbivore=

AnimalandeatsonlyPlant

•  “An‘omnivore’isananimalthateatsbothplantsandanimals”–  Omnivore=

AnimalandeatssomeAnimalandeatssomePlant

70

Whichproper.escanbefilledinattheclasslevelnow?

•  Whatcanwesayaboutallmembersofaclass?–  eats

•  Allcowseatsomeplants•  Allcatseatsomeanimals

•  Allpigseatsomeanimals&eatsomeplants

71

Fillinthedetails(canusepropertymatrixwizard)

72

Checkwithclassifier

•  CowsshouldbeHerbivores– Arethey?whynot?

• Whathavewesaid?–  Cowsareanimalsand,amongstotherthings,eatsomegrassandeatsomeleafy_plants

• Whatdoweneedtosay:Closureaxiom

–  Cowsareanimalsand,amongstotherthings,eatsomeplantsandeatonlyplants

73

ClosureAxiom

Cowsareanimalsand,amongstotherthings,eatsomeplantsandeatonlyplants

Closure Axiom

74

Inthetool

•  Rightmousebukonshortcutforclosureaxioms

–  foranyexisten.alrestric.on

addsclosureaxiom

75

OpenvsClosedWorldreasoning

•  Openworldreasoning–  Nega.onascontradic.on

•  Anythingmightbetrueunlessitcanbeprovenfalse–  Reasoningaboutanyworldconsistentwiththisone

•  Closedworldreasoning–  Nega.onasfailure

•  Anythingthatcannotbefoundisfalse–  Reasoningaboutthisworld

•  Ontologiesarenotdatabases

OntologydesignprocessRequirement

anddomainanalysis

Determinescope

Considerreuse

Enumerateterms

Defineclasses

Defineproper.es

Defineconstraints

AddInstances

Crea.nginstances

•  Createaninstanceofaclass– Theclassbecomesadirecttypeoftheinstance– Anysuperclassofthedirecttypeisatypeoftheinstance

•  Assignslotvaluesfortheinstanceframe– Slotvaluesshouldconformtothefacetconstraints– Knowledge‐acquisi.ontoolsocencheckthatconstraintsaresa.sfied

Crea.nginstances

•  Fillingtheontologieswithsuchinstancesisaseparatestep

•  Numberofinstances>>numberofclasses

•  Thuspopula.nganontologywithinstancesisnotdonemanually– Retrievedfromlegacydatasources(DBs)

– Extractedautoma.callyfromatextcorpus

OntologydesignprocessRequirement

anddomainanalysis

Determinescope

Considerreuse

Enumerateterms

Defineclasses

Defineproper.es

Defineconstraints

AddInstances

Summary

•  Stepsofontologydesign– Defineclasses;– Defineproper.es;– Defineconstraints;– Defineinstances;– Considerthestepsalloveragain…