protege构建本体教程课件.ppt

上传人(卖家):晟晟文业 文档编号:5198504 上传时间:2023-02-16 格式:PPT 页数:49 大小:415.50KB
下载 相关 举报
protege构建本体教程课件.ppt_第1页
第1页 / 共49页
protege构建本体教程课件.ppt_第2页
第2页 / 共49页
protege构建本体教程课件.ppt_第3页
第3页 / 共49页
protege构建本体教程课件.ppt_第4页
第4页 / 共49页
protege构建本体教程课件.ppt_第5页
第5页 / 共49页
点击查看更多>>
资源描述

1、A1protege构建本体教程构建本体教程A21.什么是本体(什么是本体(Ontologie)Ontologies are used to capture knowledge about some domain of interest.本体是用来获得你所感兴趣的领域的知识;A32.OWL Ontologies The most recent development in standard ontology languages is OWL from the World Wide Web Consortium(W3C)由w3c从斯坦福大学的本体语言发展而来的。A4 3.OWL Ontologie

2、s的组成的组成OWL Ontologies与基于Protege frame的本体语言在组成上比较相似,但是从专业术语上来描述时他们又有着细微的不同。OWL Ontologies是由个体(Individuals),属性(Properties),类(Classes)组成,大致对应于Protege frame的Instances,Slots,Classes.A5 3.1 Individuals(个体)指的是在域(domain)中我们感兴趣的对象。类中的一个实例。Individuals必须明确的声明彼此之间是否相同。不同的名字可能指的是相同的Individuals。A6 3.2 Properties(

3、属性)指的是Individuals上二元关系,他连接着两个Individuals。如:小三的父亲叫大三。其中,“的父亲叫”就连接着小三和大三两个Individuals。Properties可以存在reverse,如上所示,“的父亲叫”的reverse就是“的儿子叫”。Properties可以被限定成单值,此时Properties是functional的。(后面介绍)Properties也可以是transitive(可传递的)或symmetric(对称的)(后面介绍)A7 3.3 Classes可以看作是包含Individuals的集合。我们使用正式而精准的形式来描述Classes。Classe

4、s通常被组织成supperclasssubclass形式的层状结构,比如,动物和狗。A84 创建本体创建本体myPizza(PizzaBase是Pizza结构之一,中文叫“饼底”,主要由面粉做成,是Pizza的主体,和pizza toppings(比萨饼面)一起构成整个Pizza)A9 4.1 命名一个命名一个Classes(采用单词首字母大写方式,类似于java中类的命名)一个初始化的本体包含一个名字叫做Thing的classes,他表示包含所有individuals的集合,所以,所有的其他classes都是他的subclasses。A104.2 Disjoint(解体)(解体)Classe

5、s 如果任意一个Individuals(或Object)仅仅是众多Classes中某一个的实例(instance),那么这些Classes是Disjoint的。A114.3 Using The OWL Tools To Create Classes【PizzaBase 子类 ThinAndCrispy 和 DeepPan】PizzaTopping子类如下CheeseMozzarellaParmezanMeatHamPepperoniSalamiSpicyBeefSeaFoodAnchovyPrawnTunaVegtableCaperMushroomOliveOnionPepperRedPepp

6、erGreenPepperJalapenoPepperTomatoA124.4 subclass到底是什么意思呢到底是什么意思呢?例如“狗”是“动物”的subclass。那么“狗”的instance也是“动物”的instance,一个东西是狗,那么他一定是动物。(这和java中的子类父类貌似是一样的)A13A144.5.OWL Properties(概述)OWL Properties represent relationships.There are two main types of properties,Object properties and Datatype properties.O

7、bject properties are relationships between two individuals.(先介绍Object properties)如下是Object properties 和 Datatype propertiesA15 Object properties link an individual to an individual.【hasIngredien 子 hasBase hasTopping】我们可以创建Sub properties,它用来限定Supper properties的范围。For example,the property hasFather mi

8、ght specialise(限定范围)the more general property of hasParent.小明有父亲大明,那么我们也可以说小明的双亲有大明。“有父亲”就是“有双亲”的subproperty。A16 4.6 Inverse Properties(逆属性)【isIngredientOf 子 isBaseOf isToppingOf】如该例中:hasBase 和 isBaseOf就是一对Inverse PropertiesFor example:if Matthew hasParent Jean,then the inverse property we can infer

9、 that Jean hasChild Matthew.A174.7 OWL Object Property Characteristics(特征)(特征)OWL允许通过使用property characteristics来增强properties的含义(内涵)。A18(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.也就

10、是说,Properties是单值的。例如:hasBirthMother,这个就是functional的,因为一个人他只能有一个生母。A19另外: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

11、.但是如果Lily和Mary明确的声明为两个不同的Individuals,那么就会出现矛盾(inconsistency)。A20(2)Inverse Functional Properties 就是Functional Properties 的 inverse 如下:A21(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

12、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.A22(4)Symmetric(对称)Properties If a property P is symmetric,and the property relates in

13、dividual a to individual b then individual b is also related to individual a via property P.如下:A23(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.如下:A24(6)Reflexi

14、ve(自反)properties A property P is said to be reflexive when the property must relate individual a to itself.如下:A25(7)Irreflexive(非自反)properties If a property P is irreflexive,it can be described as a property that relates an individual a to individual b,where individual a and individual b are not the

15、 same.也就是说,这种properties只能连接不同的individuals。如:小明的父亲是大明,那么我们不能说小明的父亲是小明A264.8 Property Domains and Ranges【定义 hasTopping 的 Range PizzaTopping domain Pizza】【定义 isToppingOf 的 Range Pizza domain PizzaTopping】Properties may have a domain and a range specified(指定的).Properties link individuals from the domain

16、 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,

17、并且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 inverseA274.9描述和定义描述和定义Classes 4.9.1 Property RestrictionsOwl的restriction有三种:Quantifier Restrictions Cardinality Restrictions has

18、Value Restrictions.A281.quantifier restrictions(existential restrictions 和 universal restrictions)Existential restrictions :describe classes of individuals that participate in at least one relationship along a specified property to individuals that are members of a specified class.例子:我至少(at least on

19、e)买了一袋饼干从好又多超市。再比如:我做的蛋糕,上面至少覆盖了一层紫色奶酪A29【Pizza 限制 hasBase some PizzaBase】A30universal 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 rest

20、riction describes an anonymous class(an unnamed class).The anonymous class contains all of the individuals that satisfy the restriction。例如:Existential restrictions“上面至少覆盖了一层紫色奶酪。”这句话就描述了一个匿名类,任何上面覆盖至少一层紫色奶酪的individuals都属于该匿名类的,“我做的蛋糕”这个类也属于这个匿名类。所以当我们对一个类进行限制时,在supperclass里定义。A312 定义一些其他的类(一些使用技巧)【P

21、izza 子类 NamedPizza】【NamedPizza 子类MargheritaPizza has at least one toppings of MozzarellaTopping and TomatoTopping】【创建AmericanaPizza 通过克隆 MargheritaPizza 因为他扩展了一个限制 PepperoniTopping】【创建AmericanHotPizza 通过克隆 AmericanaPizza 增加限制JalapenoPepperTopping】【创建SohoPizza 克隆MargheritaPizza 增加OliveTopping 和Parmez

22、anTopping】A324.10 使用使用Reasoner(推理机)(推理机)the reasoner shipped with Protege is called Fact+.两种hierarchy:In Protege 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,判断一个

23、类是否是另一个类的子类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,观察结果】A334.11 充分必

24、要条件充分必要条件(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

25、,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

26、 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 satisfies these conditions then it must be a member of class A.A344.12 Automated Classification(自动分类)(自动分类)为什么要使用Reasoner。当我们创建了成百上千的

27、类时,使用Reasoner来自动计算子类父类之间的关系将是十分必要的。没有了Reasoner我们很难保证 大规模本体的健壮性和逻辑性。自动分类这项技术,使得本体可维护并且模块化,它不仅使得其他的本体和程序能够reuse 我们定义的本体,而且还最大限度的减少了使用者在建立多继承类时的错误。【使用OWLViz 显示类的继承层次结构】A354.13 Universal Restrictions (Quantifier Restrictions)【创建一个Pizza的子类VegetarianPizza】【增加限制 hasTopping only(CheeseTopping or VegtableTop

28、ping)】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 quantifier)have toppings that are kinds of CheeseTopping or kinds of VegetableTopping,也可以没有,比如,中国现在实行计划生育,如果夫妻有了孩子那么只能有一个,但是这个夫妻也可以没有孩

29、子。那么就不存在only这个限制。【将上面的必要条件转化为充分条件】A364.14 Automated Classification and Open World Reasoning 【使用推理机进行自动分类】我们发现MargheritaPizza 和SohoPizza 并没有被归类为 VegetarianPizza的子类,但是按照我们的定义,MargheritaPizza 和 SohoPizza 都至少有个蔬菜的顶部和奶酪的顶部,再看VegetarianPizza 的充要条件,only have 蔬菜的顶部和奶酪的顶部的pizza都是VegetarianPizza。但是Reasoning i

30、n OWL(Description Logics)is based on what is known as the open world assumption(OWA),意思是,除非我们明确的说明某个事物的存在,否则我们就不能说他是存在的。分析上面的:因为我们没有明确的指定他们只有奶酪和蔬菜顶,那么他们就可以有其他的顶部。这样的话,他们就不符合VegetarianPizza 的充要条件了。为了使这两种pizza只有蔬菜和奶酪顶部,我们就得在hasTopping上使用closure axiom(封闭公理)A374.14.1 Closure Axioms(封闭公理)it can only be f

31、illed 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 至少有一个M

32、ozzarellaTopping和TomatoTopping,并且the toppings must only be kinds of MozzarellaTopping or TomatoTopping。【Classify之后我们看结果】A384.15 Value Partitions Value Partitionsare他并不属于任何一种本体语言的一部分,而是一种设计模式,类似于面向对象程序设计中的设计模式。它可以改善我们对类的描述。【创建thing的子类ValuePartition】【ValuePartition的子类SpicinessValuePartition(Hot Medium

33、 Mild)】【创建Object Property hasSpiciness 并使其functional】【为SpicinessValuePartition 增加covering axiom 在equivalent里面输入Hot or Medium or Mild】A39这种设计模式的效果我们可以看个对比图:disjoint(关键词)A404.16 Adding Spiciness to Pizza Toppings【对PepperTopping的所有子类设置必要条件 hasSpiciness some Hot】【定义Pizza的子类SpicyPizza 设置必要条件:hasTopping s

34、ome(PizzaTopping and hasSpiciness some Hot)】【将必要条件化为充要条件】Fillter描述了一个匿名类,这个顶是Pizzatopping,并且特别辣。【Classifiy之后我们发现AmericanHotPizza 成为了SpicyPizza的子类】A414.17 Cardinality Restrictions(Owl的的restriction中的中的第二种)第二种)describe the class of individuals that have at least(min),at most(max)or exactly a specified

35、number(exactly)of relationships with other individuals or datatype values.【创建Pizza的子类InterestingPizza 定义必要条件hasTopping min 3】注意:我们这里3后面并没有指定fillter是什么,代表可以是任意的individuals,等价于:hasTopping min 3 Thing【转化为充要条件】【Classify之后观察。】A424.18 Qualified(受限的)(受限的)Cardinality Restrictions他比上面的more specify【定义NamedPiz

36、za的子类FourCheesePizza 定义必要条件hasTopping exactly 4 CheeseTopping】A435.Datatype Properties describe relationships between an individual and data values.【现在来描述pizza所含的热量】【增加Datatype Properties hasCalorificContentValue】【增加individual ExampleMargherita其 type是MargheritaPizza】【为该对象增加Data Property assertion 其中

37、type选择integer 值填写250】【增加individual ExampleSoho其 type是SohoPizza】【为该对象增加Data Property assertion 其中type选择integer 值填写800】A44 我们声明所有的pizza都有热量值【选定Pizza类,增加Supperclass 选择Data restriction creator】我们对pizza的热量值进行分类,产生不同的pizza【创建HighCaloriePizza 和LowCaloriePizza 作为Pizza的子类】【创建SupperClass 选择Class expression ed

38、itor 】【键入Pizza that hasCalorificContentValue some integer=400】【同理LowCaloriePizza应当是 400】【分别将他们设为充要条件】【Classify之后我们看他们的members】某一确定的Pizza他所含的热量是固定的,也就是说是单值的,我们可以使用functional来限定Data Property。【选定hasCalorificContentValue 选中functional】A456.More On Open World Reasoning 这部分主要展示了Open World Reasoning中的细微差别【创

39、建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.之后观察Un

40、closedPizza 既不是VegetarianPizza也不是NonVegetarianPizza.】前面封闭公理部分已经讲过了原因。A46 我们创建一个类,does not have a closure axiom(封闭公理)on the hasTopping property【创建NamedPizza的子类UnclosedPizza】【必要条件:hasTopping some MozzarellaTopping】【Classify.之后观察UnclosedPizza 既不是VegetarianPizza也不是NonVegetarianPizza.】前面封闭公理部分已经讲过了原因。A47

41、7.Creating Other OWL Constructs 7.1 Creating Individuals我们现在来描述pizza饼起源的国家;【创建Thing 的子类Country】【创建 individual:Italy England America France】因为相同的individual可以有不同的名称。【是他们Different from each other】A48 7.2 hasValue Restrictions(Owl的的restriction中的第三种中的第三种)描述的是两个individual之间至少有的关系P,【创建Object property:hasCountryOfOrigin】【选定MozzarellaTopping 增加必要条件hasCountryOfOrigin value Italy】A49 7.3 Enumerated Classes【选定Country类,在Equivalent class处增加America,England,France,Italy】意思是如果一个individual他属于Country,那么他一定属于这几个国家中的一个。

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

当前位置:首页 > 办公、行业 > 各类PPT课件(模板)
版权提示 | 免责声明

1,本文(protege构建本体教程课件.ppt)为本站会员(晟晟文业)主动上传,163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
2,用户下载本文档,所消耗的文币(积分)将全额增加到上传者的账号。
3, 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(发送邮件至3464097650@qq.com或直接QQ联系客服),我们立即给予删除!


侵权处理QQ:3464097650--上传资料QQ:3464097650

【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。


163文库-Www.163Wenku.Com |网站地图|