You are on page 1of 55

Dr.

Hoang Huu Hanh, SoST DoIT, HUSC


hanh-at-hueuni.edu.vn

IntroductiontoOntologies OntologyEngineering

Section1

OntologyinPhilosophy:
Themetaphysicalstudyofthenatureofbeing andexistence

OntologyinArtificialIntelligence:
asharedandcommonunderstandingofsome domainthatcanbecommunicatedbetween peopleandapplicationsystems (Gruber)

Ontology(languages)fortheSemanticWeb: Weaimata(XMLbased)languagetoformallydescribe concepts,instances,relationsandaxioms,i.e.data+structure inordertoenablemachineprocessablereasoningonand exchangeof data. Knowledgerepresentation,exchange,combination (inferenceofnewknowledge!)

Ontologiesarecontenttheoriesaboutthesortsof objects,propertiesofobjects,andrelations betweenobjectsthatarepossibleinaspecified domainofknowledge.

Ontologyasvocabulary
Ontologyisarepresentationvocabulary,oftenspecializedto somedomainorsubjectmatter.

Ontologyascontenttheory
Themaincontributionofontologyistoidentifyspecific classesofobjectsandrelationsthatexistinsomedomain.

Studer(98): Formal,explicitspecificationofasharedconceptualization

Machine readable Concepts,properties, functions,axioms areexplicitlydefined

Consensual knowledge Abstractmodelof somephenomena intheworld

10

Concepts:Classes+classhierarchy Properties:oftenalsocalledRolesorSlots Axioms/Relations:


labeledinstancevaluepairs relationsbetweenclasses(disjoint,covers) inheritance(multiple?defaults?) restrictionsonslots(type,cardinality) Characteristicsofslots(symm.,trans.,) instances

reasoningtasks:

Classification:Whichclassesdoesaninstancebelongto? Subsumption:Doesaclasssubsumeanotherone? Consistencychecking:Isthereacontradictioninmy axioms/instances?


11

Ontologicalanalysisclarifiesthestructureof knowledge. Ontologiesenableknowledgesharing.

12

Welldesigned
Usefulandprovenmodellingprimitives Intuitivetohumanusers Expressiveenough Efficientandcompletereasoningsupport

Welldefined
clearsyntax readontologies Formalsemantics understand(process)ontologies to facilitatemachineinterpretationofthatsemantics

Compatible
Easymapping to/fromotherontologylanguages Maximumcompatibility withXMLandRDF(S)
15

Section2

OntologyEngineering: Definingtermsinthe domainandrelationsamongthem


Definingconceptsinthedomain(classes) Arrangingtheconceptsinahierarchy(subclass superclasshierarchy) Definingwhichattributesandproperties (slots) classescanhaveandconstraintsontheirvalues Definingindividuals andfillinginslotvalues

17

Screenshotsinfurtherexamplesarefrom Protg,which:
isagraphicalontologydevelopmenttool supportsarichknowledgemodel isopensourceandfreelyavailable (http://protege.stanford.edu/)

18

Whatisthedomainthattheontologywillcover? Forwhatwearegoingtousetheontology? Forwhattypesofquestionstheinformationin theontologyshouldprovideanswers (competencyquestions)?


Answerstothesequestionsmaychangeduringthe lifecycle

19

Which wine should I serve with seafood today?

French wines and wine regions

A shared ONTOLOGY of wine and food

California wines and wine regions

20

WhichwinecharacteristicsshouldIconsider whenchoosingawine? IsBordeauxaredorwhitewine? DoesCabernetSauvignongowellwithseafood? Whatisthebestchoiceofwineforgrilledmeat? Whichcharacteristicsofawineaffectits appropriatenessforadish? Doesaflavororbodyofaspecificwinechange withvintageyear?


21

wine,grape,winery,location,... winecolor,winebody,wineflavor,sugar content,... whitewine,redwine,Bordeauxwine,... food,seafood,fish,meat,vegetables,cheese,...

22

Aclassisaconcept inthedomain
aclassofwines aclassofwineries aclassofredwines

Aclassisacollection ofelements(instances ofclasses)withsimilarproperties

23

Classesusuallyconstituteataxonomichierarchy (a subclasssuperclass hierarchy) AclasshierarchyisusuallyanISAhierarchy:


aninstanceofasubclassisaninstanceofasuperclass

Ifyouthinkofaclassasaset ofelements,a subclassisasubset

24

AppleisasubclassofFruit
Everyappleisafruit

RedwinesisasubclassofWine
Everyredwineisawine

ChiantiwineisasubclassofRedwine
EveryChiantiwineisaredwine

25

topdown definethemostgeneralconcepts firstandthenspecializethem bottomup definethemostspecific conceptsandthenorganizetheminmore generalclasses combination definethemoresalient conceptsfirstandthengeneralizeand specializethem

27

Classes(andslots)usuallyhave documentation
Describingtheclassinnaturallanguage Listingdomainassumptionsrelevanttotheclass definition Listingsynonyms

Documentingclassesandslotsisas importantasdocumentingcomputercode!
28

Slotsinaclassdefinitiondescribeattributes ofinstancesoftheclassandrelationstoother instances Eachwinewillhavecolor,sugarcontent, producer,etc

29

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

(inProtg2000)
31

Asubclassinheritsalltheslots fromthe superclass


Ifawinehasanameandflavor,aredwinealsohasaname andflavor

Ifaclasshasmultiple superclasses,itinherits slotsfromallofthem


Portisbothadessertwineandaredwine.Itinheritssugar content:highfromtheformerandcolor:redfromthe latter
32

Propertyconstraints(facets)describeorlimit thesetofpossiblevaluesforaslot
Thenameofawineisastring ThewineproducerisaninstanceofWinery Awineryhasexactlyonelocation

33

Slotcardinality thenumberofvaluesaslot has Slotvaluetype thetypeofvaluesaslothas Minimumandmaximum value arangeof valuesforanumericslot Default value thevalueaslothasunless explicitlyspecifiedotherwise

34

Minimumcardinality
Minimumcardinality1 meansthattheslotmusthavea value(required) Minimumcardinality0 meansthattheslotvalueis optional

Maximumcardinality
Maximumcardinality1 meansthattheslotcanhaveat mostonevalue(singlevaluedslot) Maximumcardinalitygreaterthan1 meansthattheslot canhavemorethanonevalue(multiplevaluedslot)
35

String:astringofcharacters(ChteauLafite) Number:anintegerorafloat(15,4.5) Boolean:atrue/falseflag Enumeratedtype:alistofallowedvalues(high, medium,low) Complextype:aninstanceofanotherclass


Specifytheclasstowhichtheinstancesbelong

TheWineclassisthevaluetypefortheslot producesattheWineryclass
36

Domain ofaslot theclass(orclasses)that havetheslot


Moreprecisely:class(orclasses)instancesof whichcanhavetheslot

Range ofaslot theclass(orclasses)to whichslotvaluesbelong

37

Asubclassinherits alltheslotsfromthesuperclass Asubclasscanoverride thefacetstonarrowthe listofallowedvalues


Makethecardinalityrangesmaller Replaceaclassintherangewithasubclass
Wine
is-a producer

Winery
is-a

French wine

producer

French winery
38

Createaninstanceofaclass
Theclassbecomesadirecttype oftheinstance Anysuperclassofthedirecttypeisatype oftheinstance

Assignslotvaluesfortheinstanceframe
Slotvaluesshouldconformtothefacetconstraints Knowledgeacquisitiontoolsoftencheckthat

39

40

Thethingstoremember:
Thereisnosinglecorrectclasshierarchy Buttherearesomeguidelines

Thequestiontoask:
Iseachinstanceofthesubclassisaninstanceofits superclass?

41

Theisarelationshipistransitive:
BisasubclassofA CisasubclassofB CisasubclassofA

Adirectsuperclass ofaclassisitsclosest superclass

42

Aclasscanhavemorethan onesuperclass Asubclassinheritsslotsand facetrestrictionsfromall theparents Differentsystemsresolve conflictsdifferently

43

Classesaredisjoint iftheycannothavecommoninstances Disjointclassescannothaveanycommonsubclasses either

Port Dessert wine

Wine

Redwine,Whitewine, Roswinearedisjoint DessertwineandRed winearenotdisjoint

Red wine

White wine

Ros wine

44

Dangerofmultiple inheritance:cyclesinthe classhierarchy ClassesA,B,andChave equivalentsetsofinstances


Bymanydefinitions,A,B,andC arethusequivalent

45

Allthesiblings intheclass hierarchymustbeatthe samelevelofgenerality Comparetosectionand subsectionsinabook

46

Ifaclasshasonlyonechild, theremaybeamodeling problem IftheonlyRedBurgundywe haveisCtesdOr,why introducethesubhierarchy? Comparetobulletsina bulletedlist

47

Ifaclasshasmore thanadozen children,additional subcategoriesmaybe necessary However,ifnonatural classificationexists, thelonglistmaybe morenatural


48

Class

Awineisnotakindof wines Awineisaninstance ofthe classWines


instance-of

Instance

49

Classesrepresentconcepts inthedomain,nottheir names Theclassnamecanchange,butitwillstillreferto thesameconcept Synonymnames forthesameconceptarenot differentclasses


Manysystemsallowlistingsynonymsaspartoftheclass definition

50

51

DOMAIN class slot

RANGE allowed values

Whendefiningadomainorrangeforaslot,findthe mostgeneralclass orclasses Considertheflavor slot


Domain:Redwine,Whitewine,Roswine Domain:Wine

Considertheproduces slotforaWinery:
Range:Redwine,Whitewine,Roswine Range:Wine
52

Aclassandasuperclass replacewiththe superclass Allsubclassesofaclass replacewiththe superclass Mostsubclassesofa class consider replacingwiththe superclass

53

Makerand Producer areinverse slots

54

Defaultvalue avaluetheslotgetswhenan instanceiscreated Adefaultvaluecanbechanged Thedefaultvalueisacommon valueforthe slot,butisnotarequiredvalue Forexample,thedefaultvalueforwinebody canbeFULL

55

Anontologyshouldnotcontainall the possibleinformationaboutthedomain


Noneedtospecializeorgeneralizemorethanthe applicationrequires Noneedtoincludeallpossiblepropertiesofa class
Onlythemostsalientproperties Onlythepropertiesthattheapplicationsrequire

56

Ontologyofwine,food,andtheirpairingsprobably willnotinclude
Bottlesize Labelcolor Myfavoritefoodandwine

Anontologyofbiologicalexperimentswillcontain
Biologicalorganism Experimenter

IstheclassExperimenterasubclassofBiological organism?
57

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

58

You might also like