protege构建本体教程课件

上传人:20****08 文档编号:242613850 上传时间:2024-08-29 格式:PPT 页数:49 大小:508.25KB
返回 下载 相关 举报
protege构建本体教程课件_第1页
第1页 / 共49页
protege构建本体教程课件_第2页
第2页 / 共49页
protege构建本体教程课件_第3页
第3页 / 共49页
点击查看更多>>
资源描述
单击此处编辑母版标题样式,单击此处编辑母版文本样式,第二级,第三级,第四级,第五级,*,A,*,protege,构建本体教程,1,A,protege构建本体教程1A,1.,什么是本体(,Ontologie,),Ontologies are used to capture knowledge about some domain of interest.,本体是用来获得你所感兴趣的领域的知识;,2,A,1.什么是本体(Ontologie)Ontologies a,2.OWL Ontologies,The most recent development in standard ontology languages is OWL from the World Wide Web Consortium (W3C),由,w3c,从斯坦福大学的本体语言发展而来的。,3,A,2.OWL OntologiesThe most recen,3.OWL Ontologies,的组成,OWL Ontologies,与基于,Protege frame,的本体语言在组成上比较相似,但是从专业术语上来描述时他们又有着细微的不同。,OWL Ontologies,是由个体(,Individuals,),属性(,Properties,),类(,Classes,)组成,大致对应于,Protege frame,的,Instances,,,Slots,,,Classes.,4,A,3.OWL Ontologies的组成OWL Ontol,3.1 Individuals,(个体),指的是在域(,domain,)中我们感兴趣的对象。类中的一个实例。,Individuals,必须明确的声明彼此之间是否相同。不同的名字可能指的是相同的,Individuals,。,5,A,3.1 Individuals(个体)5A,3.2 Properties,(属性),指的是,Individuals,上二元关系,他连接着两个,Individuals,。如:小三的父亲叫大三。其中,“的父亲叫”就连接着小三和大三两个,Individuals,。,Properties,可以存在,reverse,,如上所示,“的父亲叫”的,reverse,就是“的儿子叫”。,Properties,可以被限定成单值,此时,Properties,是,functional,的。(后面介绍),Properties,也可以是,transitive,(可传递的)或,symmetric,(对称的)(后面介绍),6,A,3.2 Properties(属性)6A,3.3 Classes,可以看作是包含,Individuals,的集合。,我们使用正式而精准的形式来描述,Classes,。,Classes,通常被组织成,supperclasssubclass,形式的层状结构,比如,动物和狗。,7,A,3.3 Classes7A,4,创建本体,myPizza,(PizzaBase,是,Pizza,结构之一,中文叫“饼底”,主要由面粉做成,是,Pizza,的主体,和,pizza toppings,(比萨饼面)一起构成整个,Pizza),8,A,4 创建本体myPizza(PizzaBase是Pizza结,4.1,命名一个,Classes,(采用单词首字母大写方式,类似于,java,中类的命名),一个初始化的本体包含一个名字叫做,Thing,的,classes,,他表示包含所有,individuals,的集合,所以,所有的其他,classes,都是他的,subclasses,。,9,A,4.1 命名一个Classes(采用单词首字母大写方式,类似,4.2 Disjoint,(解体),Classes,如果任意一个,Individuals,(或,Object,)仅仅是众多,Classes,中某一个的实例(,instance,),那么这些,Classes,是,Disjoint,的。,10,A,4.2 Disjoint(解体) Classes10A,4. 3 Using The OWL Tools To Create Classes,【PizzaBase,子类,ThinAndCrispy,和,DeepPan,】,PizzaTopping,子类如下,Cheese,Mozzarella,Parmezan,Meat,Ham,Pepperoni,Salami,SpicyBeef,SeaFood,Anchovy,Prawn,Tuna,Vegtable,Caper,Mushroom,Olive,Onion,Pepper,RedPepper,GreenPepper,JalapenoPepper,Tomato,11,A,4. 3 Using The OWL Tools To C,4.4 subclass,到底是什么意思呢,?,例如“狗”是“动物”的,subclass,。那么“狗”的,instance,也是“动物”的,instance,,一个东西是狗,那么他一定是动物。(这和,java,中的子类父类貌似是一样的),12,A,4.4 subclass到底是什么意思呢?例如“狗”是“动,13,A,13A,4.5. OWL Properties,(概述),OWL Properties represent relationships. There are two main types of properties, Object properties and Datatype properties. Object properties are relationships between two individuals.,(先介绍,Object properties,)如下是,Object properties,和,Datatype properties,14,A,4.5. OWL Properties(概述)OWL P,Object properties link an individual to an individual.,【hasIngredien,子,hasBase hasTopping,】,我们可以创建,Sub properties,,它用来限定,Supper properties,的范围。,For example, the property,hasFather,might specialise,(限定范围),the more general property of,hasParent,.,小明有父亲大明,那么我们也可以说小明的双亲有大明。“有父亲”就是“有双亲”的,subproperty,。,15,A,Object properties link an indi,4.6,Inverse Properties,(逆属性),【isIngredientOf,子,isBaseOf isToppingOf,】,如该例中:,hasBase,和,isBaseOf,就是一对,Inverse Properties,For example,:,if Matthew,hasParent,Jean, then the inverse property we can infer that Jean,hasChild,Matthew.,16,A,4.6 Inverse Properties(逆属性)16,4.7 OWL Object Property Characteristics,(特征),OWL,允许通过使用,property characteristics,来增强,properties,的含义(内涵)。,17,A,4.7 OWL Object Property Cha,(,1,),Functional Properties,If a property is functional, for a given individual, there can be at most one individual that is related to the individual via the property.,也就是说,,Properties,是单值的。,例如:,hasBirthMother,,这个就是,functional,的,因为一个人他只能有一个生母。,18,A,(1)Functional PropertiesIf a,另外:,If we say that the individual Jean,hasBirthMother,Lily and we also say that the individual Jean,hasBirthMother,Mary, then because hasBirthMother is a,functional property, we can infer that Lily and Mary must be the,same,individual.,但是如果,Lily,和,Mary,明确的声明为两个不同的,Individuals,,那么就会出现矛盾(,inconsistency,)。,19,A,另外:19A,(,2,),Inverse Functional Properties,就是,Functional Properties,的,inverse,如下:,20,A,(2) Inverse Functional Proper,(,3,),Transitive Properties,If a property is transitive, and the property relates individual,a,to individual,b, and also individual,b,to individual,c, then we can infer that individual,a,is related to individual,c,via property,P,.,如下:,注:,a)If a property is transitive then its inverse property should also be transitive.(,祖先那个例子,),b),if a property is transitive then it cannot be functional.,21,A,(3) Transitive PropertiesIf a,(,4,),Symmetric,(对称),Properties,If a property,P,is symmetric, and the property relates individual,a,to individual,b,then individual,b,is also related to individual a via property,P,.,如下:,22,A,(4) Symmetric(对称) PropertiesIf,(,5,),Antisymmetric,(反对称),properties,If a property,P,is antisymmetric, and the property relates individual,a,to individual,b,then individual,b,cannot be related to individual,a,via property,P,.,如下:,23,A,(5) Antisymmetric(反对称) propert,(,6,),Reexive,(自反),properties,A property,P,is said to be reexive when the property must relate individual,a,to itself.,如下:,24,A,(6) Reexive(自反) propertiesA p,(,7,),Irreexive,(非自反),properties,If a property,P,is irreexive, it can be described as a property that relates an individual,a,to individual,b, where individual,a,and individual,b,are not the same.,也就是说,这种,properties,只能连接,不同的,individuals,。,如:,小明的父亲是大明,那么我们不能说小明的父亲是小明,25,A,(7) Irreexive(非自反) properties,4.8 Property Domains and Ranges,【,定义,hasTopping,的,Range PizzaTopping domain Pizza,】,【,定义,isToppingOf,的,Range Pizza domain PizzaTopping,】,Properties may have a domain and a range specied,(指定的),. Properties link individuals from the,domain,to individuals from the,range,.,例如:,in myPizza,本体,,the property,hasTopping,would probably link individuals belonging the the class,Pizza,to individuals belonging to the class of,PizzaTopping,. In this case the domain of the,hasTopping,property is,Pizza,and the range is,PizzaTopping,。,另外:,如果有,a,hasTopping,b,,并且,a,与,b,都是,individuals,,那么我们就可以说,a,属于,class,Pizza,,,b,属于,class,PizzaTopping,。,通常来说,,domain for a property is the range for its inverse, and the range for a property is the domain for its inverse,26,A,4.8 Property Domains and Range,4.9,描述和定义,Classes,4.9.1 Property Restrictions,Owl,的,restriction,有三种:,Quantifier Restrictions,Cardinality Restrictions,hasValue Restrictions.,27,A,4.9描述和定义Classes4.9.1 Property,1. quantifier restrictions,(,existential restrictions,和,universal restrictions,),Existential restrictions,:,describe classes of individuals that participate in,at least one,relationship along a speci,ed property to individuals that are members of a specied class.,例子:我至少(,at least one,)买了一袋饼干从好又多超市。再比如:我做的蛋糕,上面至少覆盖了一层紫色奶酪,28,A,1. quantifier restrictions(ex,【,Pizza,限制,hasBase some PizzaBase 】,29,A,【Pizza 限制 hasBase some PizzaBa,universal restrictions,:,describe classes of individuals that for a given property only have relationships along this property to individuals that are members of a specified class.,例子:我买的东西都是从好又多市(或者我买东西只(,only,)从好又多超市),注:,A restriction describes an anonymous class (an unnamed class). The anonymous class contains all of the individuals that satisfy the restriction,。例如:,Existential restrictions,“上面至少覆盖了一层紫色奶酪。”这句话就描述了一个匿名类,任何上面覆盖至少一层紫色奶酪的,individuals,都属于该匿名类的,“我做的蛋糕”这个类也属于这个匿名类。所以当我们对一个类进行限制时,在,supperclass,里定义。,30,A,universal restrictions :des,2,定义一些其他的类(一些使用技巧),【,Pizza,子类,NamedPizza,】,【,NamedPizza,子类,MargheritaPizza,has at least one toppings of,MozzarellaTopping,and,TomatoTopping,】,【,创建,AmericanaPizza,通过克隆,MargheritaPizza,因为他扩展了一个限制,PepperoniTopping,】,【,创建,AmericanHotPizza,通过克隆,AmericanaPizza,增加限制,JalapenoPepperTopping,】,【,创建,SohoPizza,克隆,MargheritaPizza,增加,OliveTopping,和,ParmezanTopping,】,31,A,2 定义一些其他的类(一些使用技巧)【 Pizza 子类,4.10,使用,Reasoner,(推理机),the reasoner shipped with Prot,ege is called Fact+.,两种,hierarchy,:,In Prot,ege 4 the,manually constructed,class hierarchy is called the,asserted hierarchy,. The class hierarchy that is automatically computed by the reasoner is called the,inferred hierarchy,.,主要功能:,1,,判断一个类是否是另一个类的子类,2,,,consistency checking,(一致性检测),【,为了使用推理机,我们先定义一个矛盾的类,ProbeInconsistentTopping,,让他既是,CheeseTopping,又是,VegetableTopping,的子类,前提是这两个类是,disjoint,的,】,:,If a class has been found to be inconsistent its icon will be highlighted in red.,【,将,CheeseTopping VegetableTopping,设为非,disjoint,的之后,再,Classify,,观察结果,】,32,A,4.10 使用Reasoner(推理机)the reason,4.11,充分必要条件,(,primitive class,和,defined class,),All of the classes that we have created so far have only used necessary conditions to describe them.Necessary conditions can be read as,“,If something is a member of this class then it is necessary to fulfill these conditions,”,. With necessary conditions alone, we cannot say that,“,If something fulfills these conditions then it must be a member of this class,”,.,只定义了必要条件的类叫做,primitive class,定义了充要条件的类叫做,defined class,【,定义,Pizza,的子类,CheesyPizza,定义限制,hasTopping some CheeseTopping,】,【,将其转化为充分必要条件,】,【Classify,我们可以看出,defined class,的不同,】,总结:,if class A is now defined using necessary and sufficient conditions, we can say that if an individual is a member of the class A it must satisfy the conditions and we can now say that if any (random) individual satis,es these conditions then it must be a member of class A.,33,A,4.11 充分必要条件(primitive class 和,4.12 Automated Classification,(自动分类),为什么要使用,Reasoner,。当我们创建了成百上千的类时,使用,Reasoner,来自动计算子类父类之间的关系将是十分必要的。没有了,Reasoner,我们很难保证 大规模本体的健壮性和逻辑性。自动分类这项技术,使得本体可维护并且模块化,它不仅使得其他的本体和程序能够,reuse,我们定义的本体,而且还最大限度的减少了使用者在建立多继承类时的错误。,【,使用,OWLViz,显示类的继承层次结构,】,34,A,4.12 Automated Classification,4.13 Universal Restrictions,(,Quantifier Restrictions,),【,创建一个,Pizza,的子类,VegetarianPizza,】,【,增加限制,hasTopping only (CheeseTopping or VegtableTopping),】,This means that if,something,is a member of the class,VegetarianPizza,it is necessary for it to be a kind of,Pizza,and it is necessary for it to only (universal quantier) have toppings that are kinds of,CheeseTopping,or kinds of,VegetableTopping,,,也可以没有,比如,中国现在实行计划生育,如果夫妻有了孩子那么只能有一个,但是这个夫妻也可以没有孩子。那么就不存在,only,这个限制。,【,将上面的必要条件转化为充分条件,】,35,A,4.13 Universal Restrictions (,4.14 Automated Classification and Open World Reasoning,【,使用推理机进行自动分类,】,我们发现,MargheritaPizza,和,SohoPizza,并没有被归类为,VegetarianPizza,的子类,但是按照我们的定义,,MargheritaPizza,和,SohoPizza,都至少有个蔬菜的顶部和奶酪的顶部,再看,VegetarianPizza,的充要条件,,only have,蔬菜的顶部和奶酪的顶部的,pizza,都是,VegetarianPizza,。,但是,Reasoning in OWL,(Description Logics) is based on what is known as the,open world assumption,(OWA),,意思是,除非我们明确的说明某个事物的存在,否则我们就不能说他是存在的。分析上面的:因为我们没有明确的指定他们只有奶酪和蔬菜顶,那么他们就可以有其他的顶部。这样的话,他们就不符合,VegetarianPizza,的充要条件了。,为了使这两种,pizza,只有蔬菜和奶酪顶部,我们就得在,hasTopping,上使用,closure axiom,(封闭公理),36,A,4.14 Automated Classification,4.14.1 Closure Axioms,(封闭公理),it can only be filled by the specified fillers. The restriction has a filler that is the,union,of the fillers that occur in the,existential restrictions,for the property,。,【,为,MargheritaPizza,的,hasTopping,添加封闭公理,】,【hasTopping only (MozzarellaTopping or TomatoTopping)】,【,为其他几个,pizza,使用更方便的方法添加封闭公理,】,现在我们可以说,,MargheritaPizza,至少有一个,MozzarellaTopping,和,TomatoTopping,,并且,the toppings must only be kinds of MozzarellaTopping or TomatoTopping,。,【Classify,之后我们看结果,】,37,A,4.14.1 Closure Axioms(封闭公理)i,4.15 Value Partitions,Value Partitionsare,他并不属于任何一种本体语言的一部分,而是一种设计模式,类似于面向对象程序设计中的设计模式。它可以改善我们对类的描述。,【,创建,thing,的子类,ValuePartition,】,【ValuePartition,的子类,SpicinessValuePartition,(,Hot Medium Mild,),】,【,创建,Object Property,hasSpiciness,并使其,functional,】,【,为,SpicinessValuePartition,增加,covering axiom,在,equivalent,里面输入,Hot or Medium or Mild,】,38,A,4.15 Value PartitionsValue Pa,这种设计模式的效果我们可以看个对比图:,disjoint(,关键词,),39,A,这种设计模式的效果我们可以看个对比图:disjoint(关键,4.16 Adding Spiciness to Pizza Toppings,【,对,PepperTopping,的所有子类设置必要条件,hasSpiciness some Hot,】,【,定义,Pizza,的子类,SpicyPizza,设置必要条件:,hasTopping some (PizzaTopping and hasSpiciness some Hot),】,【,将必要条件化为充要条件,】,Fillter,描述了一个匿名类,这个顶是,Pizzatopping,,并且特别辣。,【Classifiy,之后我们发现,AmericanHotPizza,成为了,SpicyPizza,的子类,】,40,A,4.16 Adding Spiciness to Pizz,4.17 Cardinality Restrictions,(,Owl,的,restriction,中的第二种),describe the class of individuals that have at least(min), at most(max)or exactly a specified number(exactly) of relationships with other individuals or datatype values.,【,创建,Pizza,的子类,InterestingPizza,定义必要条件,hasTopping min 3,】,注意:我们这里,3,后面并没有指定,fillter,是什么,代表可以是任意的,individuals,,等价于:,hasTopping min 3 Thing,【,转化为充要条件,】,【Classify,之后观察。,】,41,A,4.17 Cardinality Restrictions,4.18 Qualified,(受限的),Cardinality Restrictions,他比上面的,more specify,【,定义,NamedPizza,的子类,FourCheesePizza,定义必要条件,hasTopping exactly 4 CheeseTopping,】,42,A,4.18 Qualified(受限的) Cardinali,5. Datatype Properties,describe relationships between an individual and data values.,【,现在来描述,pizza,所含的热量,】,【,增加,Datatype Properties hasCalorificContentValue,】,【,增加,individual ExampleMargherita,其,type,是,MargheritaPizza,】,【,为该对象增加,Data Property assertion,其中,type,选择,integer,值填写,250,】,【,增加,individual ExampleSoho,其,type,是,SohoPizza,】,【,为该对象增加,Data Property assertion,其中,type,选择,integer,值填写,800,】,43,A,5. Datatype Propertiesdescrib,我们声明所有的,pizza,都有热量值,【,选定,Pizza,类 ,增加,Supperclass,选择,Data restriction creator,】,我们对,pizza,的热量值进行分类,产生不同的,pizza,【,创建,HighCaloriePizza,和,LowCaloriePizza,作为,Pizza,的子类,】,【,创建,SupperClass,选择,Class expression editor,】,【,键入,Pizza that hasCalorificContentValue some integer= 400,】,【,同理,LowCaloriePizza,应当是, 400,】,【,分别将他们设为充要条件,】,【Classify,之后我们看他们的,members,】,某一确定的,Pizza,他所含的热量是固定的,也就是说是单值的,我们可以使用,functional,来限定,Data Property,。,【,选定,hasCalorificContentValue,选中,functional,】,44,A,我们声明所有的pizza都有热量值44A,6. More On Open World Reasoning,这部分主要展示了,Open World Reasoning,中的细微差别,【,创建,NonVegetarianPizza,类,作为,VegetarianPizza,类的,complement,】,【,使他们,disjoint,】,【,双击,Supperclass,中的,pizza,,添加,Pizza and not VegetarianPizza,】,【,转换为充分必要条件,】,【Classify.,之后观察,】,我们创建一个类,,does not have a closure axiom,(封闭公理),on the hasTopping property,【,创建,NamedPizza,的子类,UnclosedPizza,】,【,必要条件:,hasTopping some MozzarellaTopping,】,【Classify.,之后观察,UnclosedPizza,既不是,VegetarianPizza,也不是,NonVegetarianPizza.,】,前面封闭公理部分已经讲过了原因。,45,A,6. More On Open World Reasoni,我们创建一个类,,does not have a closure axiom,(封闭公理),on the hasTopping property,【,创建,NamedPizza,的子类,UnclosedPizza,】,【,必要条件:,hasTopping some MozzarellaTopping,】,【Classify.,之后观察,UnclosedPizza,既不是,VegetarianPizza,也不是,NonVegetarianPizza.,】,前面封闭公理部分已经讲过了原因。,46,A,我们创建一个类, does not have a closu,7. Creating Other OWL Constructs,7.1 Creating Individuals,我们现在来描述,pizza,饼起源的国家;,【,创建,Thing,的子类,Country,】,【,创建,individual,:,Italy England America France,】,因为相同的,individual,可以有不同的名称。,【,是他们,Different from each other,】,47,A,7. Creating Other OWL Construc,7.2 hasValue Restrictions,(,Owl,的,restriction,中的第三种,),描述的是两个,individual,之间至少有的关系,P,,,【,创建,Object property,:,hasCountryOfOrigin,】,【,选定,MozzarellaTopping,增加必要条件,hasCountryOfOrigin value Italy,】,48,A,7.2 hasValue Restrictions(Owl,7.3 Enumerated Classes,【,选定,Country,类 ,在,Equivalent class,处增加,America, England, France, Italy,】,意思是如果一个,individual,他属于,Country,,那么他一定属于这几个国家中的一个。,49,A,7.3 Enumerated Classes49A,
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > PPT模板库


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!