




已阅读5页,还剩44页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
protege构建本体教程,1,学习交流PPT,1.什么是本体(Ontologie),Ontologiesareusedtocaptureknowledgeaboutsomedomainofinterest.本体是用来获得你所感兴趣的领域的知识;,2,学习交流PPT,2.OWLOntologies,ThemostrecentdevelopmentinstandardontologylanguagesisOWLfromtheWorldWideWebConsortium(W3C)由w3c从斯坦福大学的本体语言发展而来的。,3,学习交流PPT,3.OWLOntologies的组成,OWLOntologies与基于Protegeframe的本体语言在组成上比较相似,但是从专业术语上来描述时他们又有着细微的不同。OWLOntologies是由个体(Individuals),属性(Properties),类(Classes)组成,大致对应于Protegeframe的Instances,Slots,Classes.,4,学习交流PPT,3.1Individuals(个体)指的是在域(domain)中我们感兴趣的对象。类中的一个实例。Individuals必须明确的声明彼此之间是否相同。不同的名字可能指的是相同的Individuals。,5,学习交流PPT,3.2Properties(属性)指的是Individuals上二元关系,他连接着两个Individuals。如:小三的父亲叫大三。其中,“的父亲叫”就连接着小三和大三两个Individuals。Properties可以存在reverse,如上所示,“的父亲叫”的reverse就是“的儿子叫”。Properties可以被限定成单值,此时Properties是functional的。(后面介绍)Properties也可以是transitive(可传递的)或symmetric(对称的)(后面介绍),6,学习交流PPT,3.3Classes可以看作是包含Individuals的集合。我们使用正式而精准的形式来描述Classes。Classes通常被组织成supperclasssubclass形式的层状结构,比如,动物和狗。,7,学习交流PPT,4创建本体myPizza,(PizzaBase是Pizza结构之一,中文叫“饼底”,主要由面粉做成,是Pizza的主体,和pizzatoppings(比萨饼面)一起构成整个Pizza),8,学习交流PPT,4.1命名一个Classes(采用单词首字母大写方式,类似于java中类的命名)一个初始化的本体包含一个名字叫做Thing的classes,他表示包含所有individuals的集合,所以,所有的其他classes都是他的subclasses。,9,学习交流PPT,4.2Disjoint(解体)Classes如果任意一个Individuals(或Object)仅仅是众多Classes中某一个的实例(instance),那么这些Classes是Disjoint的。,10,学习交流PPT,4.3UsingTheOWLToolsToCreateClasses,【PizzaBase子类ThinAndCrispy和DeepPan】PizzaTopping子类如下CheeseMozzarellaParmezanMeatHamPepperoniSalamiSpicyBeefSeaFoodAnchovyPrawnTunaVegtableCaperMushroomOliveOnionPepperRedPepperGreenPepperJalapenoPepperTomato,11,学习交流PPT,4.4subclass到底是什么意思呢?,例如“狗”是“动物”的subclass。那么“狗”的instance也是“动物”的instance,一个东西是狗,那么他一定是动物。(这和java中的子类父类貌似是一样的),12,学习交流PPT,13,学习交流PPT,4.5.OWLProperties,(概述)OWLPropertiesrepresentrelationships.Therearetwomaintypesofproperties,ObjectpropertiesandDatatypeproperties.Objectpropertiesarerelationshipsbetweentwoindividuals.(先介绍Objectproperties)如下是Objectproperties和Datatypeproperties,14,学习交流PPT,Objectpropertieslinkanindividualtoanindividual.【hasIngredien子hasBasehasTopping】我们可以创建Subproperties,它用来限定Supperproperties的范围。Forexample,thepropertyhasFathermightspecialise(限定范围)themoregeneralpropertyofhasParent.小明有父亲大明,那么我们也可以说小明的双亲有大明。“有父亲”就是“有双亲”的subproperty。,15,学习交流PPT,4.6InverseProperties(逆属性)【isIngredientOf子isBaseOfisToppingOf】如该例中:hasBase和isBaseOf就是一对InversePropertiesForexample:ifMatthewhasParentJean,thentheinversepropertywecaninferthatJeanhasChildMatthew.,16,学习交流PPT,4.7OWLObjectPropertyCharacteristics(特征)OWL允许通过使用propertycharacteristics来增强properties的含义(内涵)。,17,学习交流PPT,(1)FunctionalProperties,Ifapropertyisfunctional,foragivenindividual,therecanbeatmostoneindividualthatisrelatedtotheindividualviatheproperty.也就是说,Properties是单值的。例如:hasBirthMother,这个就是functional的,因为一个人他只能有一个生母。,18,学习交流PPT,另外:IfwesaythattheindividualJeanhasBirthMotherLilyandwealsosaythattheindividualJeanhasBirthMotherMary,thenbecausehasBirthMotherisafunctionalproperty,wecaninferthatLilyandMarymustbethesameindividual.但是如果Lily和Mary明确的声明为两个不同的Individuals,那么就会出现矛盾(inconsistency)。,19,学习交流PPT,(2)InverseFunctionalProperties,就是FunctionalProperties的inverse如下:,20,学习交流PPT,(3)TransitiveProperties,Ifapropertyistransitive,andthepropertyrelatesindividualatoindividualb,andalsoindividualbtoindividualc,thenwecaninferthatindividualaisrelatedtoindividualcviapropertyP.如下:,注:a)Ifapropertyistransitivethenitsinversepropertyshouldalsobetransitive.(祖先那个例子)b)ifapropertyistransitivethenitcannotbefunctional.,21,学习交流PPT,(4)Symmetric(对称)Properties,IfapropertyPissymmetric,andthepropertyrelatesindividualatoindividualbthenindividualbisalsorelatedtoindividualaviapropertyP.如下:,22,学习交流PPT,(5)Antisymmetric(反对称)properties,IfapropertyPisantisymmetric,andthepropertyrelatesindividualatoindividualbthenindividualbcannotberelatedtoindividualaviapropertyP.如下:,23,学习交流PPT,(6)Reexive(自反)properties,ApropertyPissaidtobereexivewhenthepropertymustrelateindividualatoitself.如下:,24,学习交流PPT,(7)Irreexive(非自反)properties,IfapropertyPisirreexive,itcanbedescribedasapropertythatrelatesanindividualatoindividualb,whereindividualaandindividualbarenotthesame.也就是说,这种properties只能连接不同的individuals。如:小明的父亲是大明,那么我们不能说小明的父亲是小明,25,学习交流PPT,4.8PropertyDomainsandRanges,【定义hasTopping的RangePizzaToppingdomainPizza】【定义isToppingOf的RangePizzadomainPizzaTopping】Propertiesmayhaveadomainandarangespecied(指定的).Propertieslinkindividualsfromthedomaintoindividualsfromtherange.例如:inmyPizza本体,thepropertyhasToppingwouldprobablylinkindividualsbelongingthetheclassPizzatoindividualsbelongingtotheclassofPizzaTopping.InthiscasethedomainofthehasToppingpropertyisPizzaandtherangeisPizzaTopping。另外:如果有ahasToppingb,并且a与b都是individuals,那么我们就可以说a属于classPizza,b属于classPizzaTopping。通常来说,domainforapropertyistherangeforitsinverse,andtherangeforapropertyisthedomainforitsinverse,26,学习交流PPT,4.9描述和定义Classes,4.9.1PropertyRestrictionsOwl的restriction有三种:QuantifierRestrictionsCardinalityRestrictionshasValueRestrictions.,27,学习交流PPT,1.quantifierrestrictions(existentialrestrictions和universalrestrictions),Existentialrestrictions:describeclassesofindividualsthatparticipateinatleastonerelationshipalongaspeciedpropertytoindividualsthataremembersofaspeciedclass.例子:我至少(atleastone)买了一袋饼干从好又多超市。再比如:我做的蛋糕,上面至少覆盖了一层紫色奶酪,28,学习交流PPT,【Pizza限制hasBasesomePizzaBase】,29,学习交流PPT,universalrestrictions:,describeclassesofindividualsthatforagivenpropertyonlyhaverelationshipsalongthispropertytoindividualsthataremembersofaspecifiedclass.例子:我买的东西都是从好又多市(或者我买东西只(only)从好又多超市)注:Arestrictiondescribesananonymousclass(anunnamedclass).Theanonymousclasscontainsalloftheindividualsthatsatisfytherestriction。例如:Existentialrestrictions“上面至少覆盖了一层紫色奶酪。”这句话就描述了一个匿名类,任何上面覆盖至少一层紫色奶酪的individuals都属于该匿名类的,“我做的蛋糕”这个类也属于这个匿名类。所以当我们对一个类进行限制时,在supperclass里定义。,30,学习交流PPT,2定义一些其他的类(一些使用技巧),【Pizza子类NamedPizza】【NamedPizza子类MargheritaPizzahasatleastonetoppingsofMozzarellaToppingandTomatoTopping】【创建AmericanaPizza通过克隆MargheritaPizza因为他扩展了一个限制PepperoniTopping】【创建AmericanHotPizza通过克隆AmericanaPizza增加限制JalapenoPepperTopping】【创建SohoPizza克隆MargheritaPizza增加OliveTopping和ParmezanTopping】,31,学习交流PPT,4.10使用Reasoner(推理机),thereasonershippedwithProtegeiscalledFact+.两种hierarchy:InProtege4themanuallyconstructedclasshierarchyiscalledtheassertedhierarchy.Theclasshierarchythatisautomaticallycomputedbythereasoneriscalledtheinferredhierarchy.主要功能:1,判断一个类是否是另一个类的子类2,consistencychecking(一致性检测)【为了使用推理机,我们先定义一个矛盾的类ProbeInconsistentTopping,让他既是CheeseTopping又是VegetableTopping的子类,前提是这两个类是disjoint的】:Ifaclasshasbeenfoundtobeinconsistentitsiconwillbehighlightedinred.【将CheeseToppingVegetableTopping设为非disjoint的之后,再Classify,观察结果】,32,学习交流PPT,4.11充分必要条件(primitiveclass和definedclass),Alloftheclassesthatwehavecreatedsofarhaveonlyusednecessaryconditionstodescribethem.Necessaryconditionscanbereadas,“Ifsomethingisamemberofthisclassthenitisnecessarytofulfilltheseconditions”.Withnecessaryconditionsalone,wecannotsaythat,“Ifsomethingfulfillstheseconditionsthenitmustbeamemberofthisclass”.只定义了必要条件的类叫做primitiveclass定义了充要条件的类叫做definedclass【定义Pizza的子类CheesyPizza定义限制hasToppingsomeCheeseTopping】【将其转化为充分必要条件】【Classify我们可以看出definedclass的不同】总结:ifclassAisnowdefinedusingnecessaryandsufficientconditions,wecansaythatifanindividualisamemberoftheclassAitmustsatisfytheconditionsandwecannowsaythatifany(random)individualsatisestheseconditionsthenitmustbeamemberofclassA.,33,学习交流PPT,4.12AutomatedClassification(自动分类),为什么要使用Reasoner。当我们创建了成百上千的类时,使用Reasoner来自动计算子类父类之间的关系将是十分必要的。没有了Reasoner我们很难保证大规模本体的健壮性和逻辑性。自动分类这项技术,使得本体可维护并且模块化,它不仅使得其他的本体和程序能够reuse我们定义的本体,而且还最大限度的减少了使用者在建立多继承类时的错误。【使用OWLViz显示类的继承层次结构】,34,学习交流PPT,4.13UniversalRestrictions(QuantifierRestrictions),【创建一个Pizza的子类VegetarianPizza】【增加限制hasToppingonly(CheeseToppingorVegtableTopping)】ThismeansthatifsomethingisamemberoftheclassVegetarianPizzaitisnecessaryforittobeakindofPizzaanditisnecessaryforittoonly(universalquantier)havetoppingsthatarekindsofCheeseToppingorkindsofVegetableTopping,也可以没有,比如,中国现在实行计划生育,如果夫妻有了孩子那么只能有一个,但是这个夫妻也可以没有孩子。那么就不存在only这个限制。【将上面的必要条件转化为充分条件】,35,学习交流PPT,4.14AutomatedClassificationandOpenWorldReasoning,【使用推理机进行自动分类】我们发现MargheritaPizza和SohoPizza并没有被归类为VegetarianPizza的子类,但是按照我们的定义,MargheritaPizza和SohoPizza都至少有个蔬菜的顶部和奶酪的顶部,再看VegetarianPizza的充要条件,onlyhave蔬菜的顶部和奶酪的顶部的pizza都是VegetarianPizza。但是ReasoninginOWL(DescriptionLogics)isbasedonwhatisknownastheopenworldassumption(OWA),意思是,除非我们明确的说明某个事物的存在,否则我们就不能说他是存在的。分析上面的:因为我们没有明确的指定他们只有奶酪和蔬菜顶,那么他们就可以有其他的顶部。这样的话,他们就不符合VegetarianPizza的充要条件了。为了使这两种pizza只有蔬菜和奶酪顶部,我们就得在hasTopping上使用closureaxiom(封闭公理),36,学习交流PPT,4.14.1ClosureAxioms(封闭公理),itcanonlybefilledbythespecifiedfillers.Therestrictionhasafillerthatistheunionofthefillersthatoccurintheexistentialrestrictionsfortheproperty。【为MargheritaPizza的hasTopping添加封闭公理】【hasToppingonly(MozzarellaToppingorTomatoTopping)】【为其他几个pizza使用更方便的方法添加封闭公理】现在我们可以说,MargheritaPizza至少有一个MozzarellaTopping和TomatoTopping,并且thetoppingsmustonlybekindsofMozzarellaToppingorTomatoTopping。【Classify之后我们看结果】,37,学习交流PPT,4.15ValuePartitions,ValuePartitionsare他并不属于任何一种本体语言的一部分,而是一种设计模式,类似于面向对象程序设计中的设计模式。它可以改善我们对类的描述。【创建thing的子类ValuePartition】【ValuePartition的子类SpicinessValuePartition(HotMediumMild)】【创建ObjectPropertyhasSpiciness并使其functional】【为SpicinessValuePartition增加coveringaxiom在equivalent里面输入HotorMediumorMild】,38,学习交流PPT,这种设计模式的效果我们可以看个对比图:disjoint(关键词),39,学习交流PPT,4.16AddingSpicinesstoPizzaToppings,【对PepperTopping的所有子类设置必要条件hasSpicinesssomeHot】【定义Pizza的子类SpicyPizza设置必要条件:hasToppingsome(PizzaToppingandhasSpicinesssomeHot)】【将必要条件化为充要条件】Fillter描述了一个匿名类,这个顶是Pizzatopping,并且特别辣。【Classifiy之后我们发现AmericanHotPizza成为了SpicyPizza的子类】,40,学习交流PPT,4.17CardinalityRestrictions(Owl的restriction中的第二种),describetheclassofindividualsthathaveatleast(min),atmost(max)orexactlyaspecifiednumber(exactly)ofrelationshipswithotherindividualsordatatypevalues.【创建Pizza的子类InterestingPizza定义必要条件hasToppingmin3】注意:我们这里3后面并没有指定fillter是什么,代表可以是任意的individuals,等价于:hasToppingmin3Thing【转化为充要条件】【Classify之后观察。】,41,学习交流PPT,4.18Qualified(受限的)CardinalityRestrictions,他比上面的morespecify【定义NamedPizza的子类FourCheesePizza定义必要条件hasToppingexactly4CheeseTopping】,42,学习交流PPT,5.DatatypeProperties,describerelationshipsbetweenanindividualanddatavalues.【现在来描述pizza所含的热量】【增加DatatypePropertieshasCalorificContentValue】【增加individualExampleMargherita其type是MargheritaPizza】【为该对象增加DataPropertyassertion其中type选择integer值填写250】【增加individualExampleSoho其type是SohoPizza】【为该对象增加DataPropertyassertion其中type选择integer值填写800】,43,学习交流PPT,我们声明所有的pizza都有热量值【选定Pizza类,增加Supperclass选择Datarestrictioncreator】我们对pizza的热量值进行分类,产生不同的pizza【创建HighCaloriePizza和LowCaloriePizza作为Pizza的子类】【创建SupperClass选择Classexpressioneditor】【键入PizzathathasCalorificContentValuesomeinteger=400】【同理LowCaloriePizza应当是400】【分别将他们设为充要条件】【Classify之后我们看他们的members】某一确定的Pizza他所含的热量是固定的,也就是说是单值的,我们可以使用functional来限定DataProperty。【选定hasCalorificContentV
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026届湖北省枣阳五中学英语九年级第一学期期末监测模拟试题含解析
- 颈部矫正专业培训课程
- 2026届江苏省扬州市仪征市新集初级中学九年级化学第一学期期中检测试题含解析
- 帕博利珠单抗深度解析
- 2026届四川省广安邻水县联考九年级化学第一学期期中复习检测模拟试题含解析
- 重庆市西南大附属中学2026届九年级化学第一学期期中综合测试模拟试题含解析
- 云南省泸西县2026届九年级化学第一学期期中联考模拟试题含解析
- 大数据培训宣讲
- 四川省江油市五校2026届九年级化学第一学期期中质量跟踪监视试题含解析
- 2026届德州陵城区五校联考英语九上期末学业质量监测模拟试题含解析
- 小儿静脉输液规范
- 土方换填施工方案
- 触电事故应急演练方案
- 少先队的作风课件
- 第1课“北京双奥”荣耀中华 课件 2024-2025学年人教版(2024)初中体育与健康七年级全一册
- 国家安全教育大学生读本课件高教2024年8月版课件-第四章坚持以人民安全为宗旨
- 施工船舶对通航安全的影响及管理策略
- 妇产科三基三严培训内容
- 《服装品牌策划课件》课件
- 《中国哲学史》课件
- 人员退休欢送会34
评论
0/150
提交评论