protege构建本体教程.pptx

上传人:wj 文档编号:8431234 上传时间:2023-05-13 格式:PPTX 页数:49 大小:423.67KB
下载 相关 举报
protege构建本体教程.pptx_第1页
第1页 / 共49页
protege构建本体教程.pptx_第2页
第2页 / 共49页
protege构建本体教程.pptx_第3页
第3页 / 共49页
protege构建本体教程.pptx_第4页
第4页 / 共49页
protege构建本体教程.pptx_第5页
第5页 / 共49页
protege构建本体教程.pptx_第6页
第6页 / 共49页
protege构建本体教程.pptx_第7页
第7页 / 共49页
protege构建本体教程.pptx_第8页
第8页 / 共49页
protege构建本体教程.pptx_第9页
第9页 / 共49页
protege构建本体教程.pptx_第10页
第10页 / 共49页
protege构建本体教程.pptx_第11页
第11页 / 共49页
protege构建本体教程.pptx_第12页
第12页 / 共49页
protege构建本体教程.pptx_第13页
第13页 / 共49页
protege构建本体教程.pptx_第14页
第14页 / 共49页
protege构建本体教程.pptx_第15页
第15页 / 共49页
protege构建本体教程.pptx_第16页
第16页 / 共49页
protege构建本体教程.pptx_第17页
第17页 / 共49页
protege构建本体教程.pptx_第18页
第18页 / 共49页
protege构建本体教程.pptx_第19页
第19页 / 共49页
protege构建本体教程.pptx_第20页
第20页 / 共49页
亲,该文档总共49页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

protege构建本体教程.pptx

《protege构建本体教程.pptx》由会员分享,可在线阅读,更多相关《protege构建本体教程.pptx(49页珍藏版)》请在冰点文库上搜索。

protege构建本体教程.pptx

protege构建本体教程,1.什么是本体(Ontologie),Ontologiesareusedtocaptureknowledgeaboutsomedomainofinterest.本体是用来获得你所感兴趣的领域的知识;,2.OWLOntologies,ThemostrecentdevelopmentinstandardontologylanguagesisOWLfromtheWorldWideWebConsortium(W3C)由w3c从斯坦福大学的本体语言发展而来的。

3.OWLOntologies的组成,OWLOntologies与基于Protegeframe的本体语言在组成上比较相似,但是从专业术语上来描述时他们又有着细微的不同。

OWLOntologies是由个体(Individuals),属性(Properties),类(Classes)组成,大致对应于Protegeframe的Instances,Slots,Classes.,3.1Individuals(个体)指的是在域(domain)中我们感兴趣的对象。

类中的一个实例。

Individuals必须明确的声明彼此之间是否相同。

不同的名字可能指的是相同的Individuals。

3.2Properties(属性)指的是Individuals上二元关系,他连接着两个Individuals。

如:

小三的父亲叫大三。

其中,“的父亲叫”就连接着小三和大三两个Individuals。

Properties可以存在reverse,如上所示,“的父亲叫”的reverse就是“的儿子叫”。

Properties可以被限定成单值,此时Properties是functional的。

(后面介绍)Properties也可以是transitive(可传递的)或symmetric(对称的)(后面介绍),3.3Classes可以看作是包含Individuals的集合。

我们使用正式而精准的形式来描述Classes。

Classes通常被组织成supperclasssubclass形式的层状结构,比如,动物和狗。

4创建本体myPizza,(PizzaBase是Pizza结构之一,中文叫“饼底”,主要由面粉做成,是Pizza的主体,和pizzatoppings(比萨饼面)一起构成整个Pizza),4.1命名一个Classes(采用单词首字母大写方式,类似于java中类的命名)一个初始化的本体包含一个名字叫做Thing的classes,他表示包含所有individuals的集合,所以,所有的其他classes都是他的subclasses。

4.2Disjoint(解体)Classes如果任意一个Individuals(或Object)仅仅是众多Classes中某一个的实例(instance),那么这些Classes是Disjoint的。

4.3UsingTheOWLToolsToCreateClasses,【PizzaBase子类ThinAndCrispy和DeepPan】PizzaTopping子类如下CheeseMozzarellaParmezanMeatHamPepperoniSalamiSpicyBeefSeaFoodAnchovyPrawnTunaVegtableCaperMushroomOliveOnionPepperRedPepperGreenPepperJalapenoPepperTomato,4.4subclass到底是什么意思呢?

例如“狗”是“动物”的subclass。

那么“狗”的instance也是“动物”的instance,一个东西是狗,那么他一定是动物。

(这和java中的子类父类貌似是一样的),4.5.OWLProperties,(概述)OWLPropertiesrepresentrelationships.Therearetwomaintypesofproperties,ObjectpropertiesandDatatypeproperties.Objectpropertiesarerelationshipsbetweentwoindividuals.(先介绍Objectproperties)如下是Objectproperties和Datatypeproperties,Objectpropertieslinkanindividualtoanindividual.【hasIngredien子hasBasehasTopping】我们可以创建Subproperties,它用来限定Supperproperties的范围。

Forexample,thepropertyhasFathermightspecialise(限定范围)themoregeneralpropertyofhasParent.小明有父亲大明,那么我们也可以说小明的双亲有大明。

“有父亲”就是“有双亲”的subproperty。

4.6InverseProperties(逆属性)【isIngredientOf子isBaseOfisToppingOf】如该例中:

hasBase和isBaseOf就是一对InversePropertiesForexample:

ifMatthewhasParentJean,thentheinversepropertywecaninferthatJeanhasChildMatthew.,4.7OWLObjectPropertyCharacteristics(特征)OWL允许通过使用propertycharacteristics来增强properties的含义(内涵)。

(1)FunctionalProperties,Ifapropertyisfunctional,foragivenindividual,therecanbeatmostoneindividualthatisrelatedtotheindividualviatheproperty.也就是说,Properties是单值的。

例如:

hasBirthMother,这个就是functional的,因为一个人他只能有一个生母。

另外:

IfwesaythattheindividualJeanhasBirthMotherLilyandwealsosaythattheindividualJeanhasBirthMotherMary,thenbecausehasBirthMotherisafunctionalproperty,wecaninferthatLilyandMarymustbethesameindividual.但是如果Lily和Mary明确的声明为两个不同的Individuals,那么就会出现矛盾(inconsistency)。

(2)InverseFunctionalProperties,就是FunctionalProperties的inverse如下:

(3)TransitiveProperties,Ifapropertyistransitive,andthepropertyrelatesindividualatoindividualb,andalsoindividualbtoindividualc,thenwecaninferthatindividualaisrelatedtoindividualcviapropertyP.如下:

注:

a)Ifapropertyistransitivethenitsinversepropertyshouldalsobetransitive.(祖先那个例子)b)ifapropertyistransitivethenitcannotbefunctional.,(4)Symmetric(对称)Properties,IfapropertyPissymmetric,andthepropertyrelatesindividualatoindividualbthenindividualbisalsorelatedtoindividualaviapropertyP.如下:

(5)Antisymmetric(反对称)properties,IfapropertyPisantisymmetric,andthepropertyrelatesindividualatoindividualbthenindividualbcannotberelatedtoindividualaviapropertyP.如下:

(6)Reexive(自反)properties,ApropertyPissaidtobereexivewhenthepropertymustrelateindividualatoitself.如下:

(7)Irreexive(非自反)properties,IfapropertyPisirreexive,itcanbedescribedasapropertythatrelatesanindividualatoindividualb,whereindividualaandindividualbarenotthesame.也就是说,这种properties只能连接不同的individuals。

如:

小明的父亲是大明,那么我们不能说小明的父亲是小明,4.8PropertyDomainsandRanges,【定义hasTopping的RangePizzaToppingdomainPizza】【定义isToppingOf的RangePizzadomainPizzaTopping】Propertiesmayhaveadomainandarangespecied(指定的).Propertieslinkindividualsfromthedomaintoindividualsfromtherange.例如:

inmyPizza本体,thepropertyhasToppingwouldprobablylinkindividualsbelongingthetheclassPizzatoindividualsbelongingtotheclassofPizzaTopping.InthiscasethedomainofthehasToppingpropertyisPizzaandtherangeisPizzaTopping。

另外:

如果有ahasToppingb,并且a与b都是individuals,那么我们就可以说a属于classPizza,b属于classPizzaTopping。

通常来说,domainforapropertyistherangeforitsinverse,andtherangeforapropertyisthedomainforitsinverse,4.9描述和定义Classes,4.9.1PropertyRestrictionsOwl的restriction有三种:

QuantifierRestrictionsCardinalityRestrictionshasValueRestrictions.,1.quantifierrestrictions(existentialrestrictions和universalrestrictions),Existentialrestrictions:

describeclassesofindividualsthatparticipateinatleastonerelationshipalongaspeciedpropertytoindividualsthataremembersofaspeciedclass.例子:

我至少(atleastone)买了一袋饼干从好又多超市。

再比如:

我做的蛋糕,上面至少覆盖了一层紫色奶酪,【Pizza限制hasBasesomePizzaBase】,universalrestrictions:

describeclassesofindividualsthatforagivenpropertyonlyhaverelationshipsalongthispropertytoindividualsthataremembersofaspecifiedclass.例子:

我买的东西都是从好又多市(或者我买东西只(only)从好又多超市)注:

Arestrictiondescribesananonymousclass(anunnamedclass).Theanonymousclasscontainsalloftheindividualsthatsatisfytherestriction。

例如:

Existentialrestrictions“上面至少覆盖了一层紫色奶酪。

”这句话就描述了一个匿名类,任何上面覆盖至少一层紫色奶酪的individuals都属于该匿名类的,“我做的蛋糕”这个类也属于这个匿名类。

所以当我们对一个类进行限制时,在supperclass里定义。

2定义一些其他的类(一些使用技巧),【Pizza子类NamedPizza】【NamedPizza子类MargheritaPizzahasatleastonetoppingsofMozzarellaToppingandTomatoTopping】【创建AmericanaPizza通过克隆MargheritaPizza因为他扩展了一个限制PepperoniTopping】【创建AmericanHotPizza通过克隆AmericanaPizza增加限制JalapenoPepperTopping】【创建SohoPizza克隆MargheritaPizza增加OliveTopping和ParmezanTopping】,4.10使用Reasoner(推理机),thereasonershippedwithProtegeiscalledFact+.两种hierarchy:

InProtege4themanuallyconstructedclasshierarchyiscalledtheassertedhierarchy.Theclasshierarchythatisautomaticallycomputedbythereasoneriscalledtheinferredhierarchy.主要功能:

1,判断一个类是否是另一个类的子类2,consistencychecking(一致性检测)【为了使用推理机,我们先定义一个矛盾的类ProbeInconsistentTopping,让他既是CheeseTopping又是VegetableTopping的子类,前提是这两个类是disjoint的】:

Ifaclasshasbeenfoundtobeinconsistentitsiconwillbehighlightedinred.【将CheeseToppingVegetableTopping设为非disjoint的之后,再Classify,观察结果】,4.11充分必要条件(primitiveclass和definedclass),Alloftheclassesthatwehavecreatedsofarhaveonlyusednecessaryconditionstodescribethem.Necessaryconditionscanbereadas,“Ifsomethingisamemberofthisclassthenitisnecessarytofulfilltheseconditions”.Withnecessaryconditionsalone,wecannotsaythat,“Ifsomethingfulfillstheseconditionsthenitmustbeamemberofthisclass”.只定义了必要条件的类叫做primitiveclass定义了充要条件的类叫做definedclass【定义Pizza的子类CheesyPizza定义限制hasToppingsomeCheeseTopping】【将其转化为充分必要条件】【Classify我们可以看出definedclass的不同】总结:

ifclassAisnowdefinedusingnecessaryandsufficientconditions,wecansaythatifanindividualisamemberoftheclassAitmustsatisfytheconditionsandwecannowsaythatifany(random)individualsatisestheseconditionsthenitmustbeamemberofclassA.,4.12AutomatedClassification(自动分类),为什么要使用Reasoner。

当我们创建了成百上千的类时,使用Reasoner来自动计算子类父类之间的关系将是十分必要的。

没有了Reasoner我们很难保证大规模本体的健壮性和逻辑性。

自动分类这项技术,使得本体可维护并且模块化,它不仅使得其他的本体和程序能够reuse我们定义的本体,而且还最大限度的减少了使用者在建立多继承类时的错误。

【使用OWLViz显示类的继承层次结构】,4.13UniversalRestrictions(QuantifierRestrictions),【创建一个Pizza的子类VegetarianPizza】【增加限制hasToppingonly(CheeseToppingorVegtableTopping)】ThismeansthatifsomethingisamemberoftheclassVegetarianPizzaitisnecessaryforittobeakindofPizzaanditisnecessaryforittoonly(universalquantier)havetoppingsthatarekindsofCheeseToppingorkindsofVegetableTopping,也可以没有,比如,中国现在实行计划生育,如果夫妻有了孩子那么只能有一个,但是这个夫妻也可以没有孩子。

那么就不存在only这个限制。

【将上面的必要条件转化为充分条件】,4.14AutomatedClassificationandOpenWorldReasoning,【使用推理机进行自动分类】我们发现MargheritaPizza和SohoPizza并没有被归类为VegetarianPizza的子类,但是按照我们的定义,MargheritaPizza和SohoPizza都至少有个蔬菜的顶部和奶酪的顶部,再看VegetarianPizza的充要条件,onlyhave蔬菜的顶部和奶酪的顶部的pizza都是VegetarianPizza。

但是ReasoninginOWL(DescriptionLogics)isbasedonwhatisknownastheopenworldassumption(OWA),意思是,除非我们明确的说明某个事物的存在,否则我们就不能说他是存在的。

分析上面的:

因为我们没有明确的指定他们只有奶酪和蔬菜顶,那么他们就可以有其他的顶部。

这样的话,他们就不符合VegetarianPizza的充要条件了。

为了使这两种pizza只有蔬菜和奶酪顶部,我们就得在hasTopping上使用closureaxiom(封闭公理),4.14.1ClosureAxioms(封闭公理),itcanonlybefilledbythespecifiedfillers.Therestrictionhasafillerthatistheunionofthefillersthatoccurintheexistentialrestrictionsfortheproperty。

【为MargheritaPizza的hasTopping添加封闭公理】【hasToppingonly(MozzarellaToppingorTomatoTopping)】【为其他几个pizza使用更方便的方法添加封闭公理】现在我们可以说,MargheritaPizza至少有一个MozzarellaTopping和TomatoTopping,并且thetoppingsmustonlybekindsofMozzarellaToppingorTomatoTopping。

【Classify之后我们看结果】,4.15ValuePartitions,ValuePartitionsare他并不属于任何一种本体语言的一部分,而是一种设计模式,类似于面向对象程序设计中的设计模式。

它可以改善我们对类的描述。

【创建thing的子类ValuePartition】【ValuePartition的子类SpicinessValuePartition(HotMediumMild)】【创建ObjectPropertyhasSpiciness并使其functional】【为SpicinessValuePartition增加coveringaxiom在equivalent里面输入HotorMediumorMild】,这种设计模式的效果我们可以看个对比图:

disjoint(关键词),4.16AddingSpicinesstoPizzaToppings,【对PepperTopping的所有子类设置必要条件hasSpicinesssomeHot】【定义Pizza的子类SpicyPizza设置必要条件:

hasToppingsome(PizzaToppingandhasSpicinesssomeHot)】【将必要条件化为充要条件】Fillter描述了一个匿名类,这个顶是Pizzatopping,并且特别辣。

【Classifiy之后我们发现AmericanHotPizza成为了SpicyPizza的子类】,4.17CardinalityRestrictions(Owl的restriction中的第二种),describetheclassofindividualsthathaveatleast(

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > PPT模板 > 商务科技

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2