


版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、viaThe Prot eg e platform supports two main ways of modeling ontologies the Prot eg e-Framesand Prot eg e-OWL editors(我们使用的是后者)1.什么是本体(Ontologie)Ontologies are used to capture knowledge about some domain of in terest.本体是用来获得你所感兴趣的领域的知识;2.OWL On tologiesThe most rece nt developme nt in sta ndard on t
2、ology Ian guages is OWL from the World Wide Web Con sortium (W3C)由w3c从斯坦福大学的本体语言发展而来的。3.OWL On tologies 的组成OWL Ontologies与基于Prot eg e frame的本体语言在组成上比较相似,但是从专业术语上来描述时他们又有着细微的不同。OWLOntologies是由个体(Individuals),属性(Properties),类(Classes 组成,大致对应于 Protege frame 的 Instances, Slots , Classes.3.1 Individuals
3、(个体)指的是在域(domain)中我们感兴趣的对象。类中的一个实例。In dividuals必须明确的声明彼此之间是否相同。不同的名字可能指的是相同的Individuals。3.2 Properties (属性)指的是Individuals上二元关系,他连接着两个Individuals。如:小三的父亲叫大三。其中,“的父亲叫”就连接着小三和大三两个In dividuals。Properties 可以存在 reverse,如上所示,“的父亲叫”的 reverse 就是“的儿子叫”。Properties可以被限定成单值,此时Properties是functional的。(后 面介绍)Proper
4、ties也可以是transitive (可传递的)或symmetric (对称的) (后面介绍)3.3 Classes可以看作是包含Individuals的集合。我们使用正式而精准的形式来描述Classes Classes®常被组织成supperclass-subclass形式的层状结构,比如,动物和狗。4仓【I建本体myPizza(PizzaBase是 Pizza结构之一,中文叫“饼底”,主要由面粉做成,是 Pizza的主体,和pizza toppings (比萨饼面)一起构成整个 Pizza)4.1命名一个Classes(采用单词首字母大写方式,类似于java中 类的命名)一个初
5、始化的本体包含一个名字叫做 Thing的classes他 表示包含所有individuals的集合,所以,所有的其他 classes都是 他的 subclasses4.2 Disjoint (解体)Classes如果任意一个Individuals (或Object)仅仅是众多 Classes中某 一个的实例(instanee),那么这些 Classes是 Disjoint 的。4.3 Using The OWL Tools To Create Classes【PizzaBase子类 ThinAndCrispy 和 DeepPar】PizzaTopp ing子类如下CheeseMozzarell
6、aParmezanMeatHamPepperoniSalamiSpicyBeefSeaFoodAnchovyPrawnTunaVegtableCaperMushroomOliveOnionPepperRedPepperGree nPepperJalape noPepperTomato4.4 subclass到底是什么意思呢?例如“狗”是“动物”的subclass那么“狗”的instanee也是“动物”的instanee, 个东西是狗,那么他一定是动物。(这和java中的子类父类貌似是一样的)Pizz 日 ToppingTomatoToppingVegetableToppingThe Meani
7、ng Of Subclass .4/ individuals that are members cf the class TcmatoTbppinre inembeis of theVeQetabeTopaing and Mitiubers of the P ZZaTopcing a* ha1*e staitdLhat TcmatoTopp )且 ±tibMd uf VAge:aDleTopning 昭 hick 詮 a stiLcl uf Piz;aTopp ng4.5. OWL Properties(概述)OWL Properties represe nt relati on s
8、hips. There are two main types of properties, Object properties and Datatype properties. Object properties are relati on ships betwee n two in dividuals.(先介绍 Object properties) 如下是 Object properties 禾口 Datatype propertiesYsSisterMatt hewGemmaAn abject property linkinq thindividual Marth »w ro T
9、h incdivicJu alMarr hewAxsdiintgprA datatype property hrnking the individualMtfirth ew to the d<ita literal which has 曰 type cf 曰门 X5d:intsger.Object properties link an in dividual to an in dividual.【has In gredie n 子 hasBase hasTopp inj我们可以创建 Sub properties,它用来限定 Supper properties 的范围。For exampl
10、e, the property hasFather might specialise (限定范 围)the more general property of hasParent 小明有父亲大明,那么我 们也可以说小明的双亲有大明。“有父亲”就是“有双亲”的subproperty。4.6 In verse Properties (逆属性)【islngredientOf 子 isBaseOf isToppingO】如该例中: hasBase 和 isBaseOf就 是一对 In verse PropertiesFor example: if Matthew hasParent Jean, then
11、 the inverse property we can infer that Jea nhasChild Matthew.4.7 OWL Object Property Characteristics (特征)OWL 允许通过使用 property characteristics 来增强 properties的含义(内涵)。(1)Functional PropertiesIf a property is fun cti on al, for a give n in dividual, there can be atmost one in dividual that is related to
12、 the in dividual via the property.也就是说,Properties是单值的。例如:hasBirthMother,这个就是functional的,因为一个人 他只能有一个生母。另外:If we say that the in dividual Jea n hasBirthMother Lily and we also say that the in dividual Jea n hasBirthMother Mary, the n because hasBirthMother is a functional property , we can infer that
13、 Lily and Mary must be the same in dividual.但是如果 Lily 和 Mary 明确的声 明为两个不同的Individuals,那么就会出现矛盾(inconsistency)。Figure 4.19: An Example Of A Functional Property: hasBirthMother(2) Inv erse Fun cti onal Properties就是 Functional Properties 的 inverse如下:ure 4.20:E?taiiipLe Of An Imierse Functional Property7
14、: isBirthMothrOf(3) Tran sitive PropertiesIf a property is tra nsitive, and the property relates in dividual a toin dividual b, and also in dividual b to in dividual c, the n we can inferthat in dividual a is related to in dividual c via property P.如下:Figure 4.21: An Example Of A Iran sit ire Proper
15、ty: hasAnc©StOfWilliam注: : a)If a property is transitive then its inverse property should also be transitive.(祖先那个例子)b) if a property is tran sitive the n it cannot be fun cti on al.(4) Symmetric (对称)PropertiesIf a property P is symmetric, and the property relates in dividual ato in dividual b
16、the n in dividual b is also related to in dividual a viaemmaF igure 4.22: An Example Of A Symmetric Property: has Sibling(5) Antisymmetric (反对称)propertiesIf a property P is antisymmetric, and the property relates in dividual a to in dividual b the n in dividual b cannot be related tos.Bilkin dividua
17、l a via property P.如下:Robert hCMldOfFigure 4.24: An example of tlie antisymmetric property liasCliildOf(6) Re?exive (自反) propertiesA property P is said to be re?exive whe n the property must relate in dividual a to itself.如下::Figure 4.25: An example of a Reflexive Property: knows(7) Irre?exive (非自反)
18、 propertiesIf a property P is irre?exive, it can be described as a property thatrelates an in dividual a to in dividual b, where in dividual a andin dividual b are n ot the same.也就是说,这种 properties 只能连接不同的individuals。如:小明的父亲是大明,那么我们不能说小明的父亲是小明4.8 Property Doma ins and Ran ges【定义 hasTopping 的 Range Pi
19、zzaTopping domain Pizza】【定义 isToppingOf 的 Range Pizza domain PizzaTopping Properties may have a domain and a range speci?ed (指定的). Properties link individuals from the domain to individuals from the ran ge.例如:in myPizza 本体, the property hasTopping would probably link individuals belonging the the cl
20、ass Pizzato individuals belonging to the class of PizzaTopping In this case the domain of the hasTopping property is Pizzaa nd the range isPizzaTopp ing另外: 女口果有 a hasTopping b,并且 a与 b都是individuals, 那么我们就可以说 a属于class Pizza, b属于class PizzaTopping 通常来说,domai n for a property is the range for its inv er
21、se, and the range for a property is the domain for its inverse4.9描述和定义ClassesOwl 的 restriction 有三种:Quan tifier Restrictio nsCardi nality Restricti onshasValue Restricti ons.1. quantifier restrictions( existential restrictions 和 universal restrictions)Existe ntial restricti ons :describe classes of i
22、n dividuals that participate inat least one relati on ship along a spec?ed property to in dividuals that are members of a speci?ed class.例子::我至少(at least one)买了一袋饼干从好又多超市。 再比如: 我做的蛋糕,上面至少覆盖了一层紫色奶酪”一 M也也毀 r 一嗣删购.一Things th st h ave at leastMozzareliaTapping(ha&lopping some KI azzarelLaTop ping:Fi
23、gure 氓 2 th The riel inn hasTopping some M07?afiilia. Th.- rRtrietinnrjie chss of indivirhiHlsthat at least tupping that is Mozzarella【Pizza 限制 hasBase some PizzaBase uni versal restrictio nsdescribe classes of individuals that for a given property only have relati on ships along this property to in
24、 dividuals that are members of a specified class.例子:我买的东西都是从好又多市(或者我买东西只(only)从好又多超市)注:A restrict on describes an anonym ous class (an unn amed class). The anonymous class contains all of the individuals that satisfy the restriction。例如:Existential restrictions “上面至少覆盖了一层紫色 奶酪。”这句话就描述了一个匿名类,任何上面覆盖至少一
25、层紫色奶 酪的individuals都属于该匿名类的,“我做的蛋糕”这个类也属于这 个匿名类。所以当我们对一个类进行限制时,在supperclass里定义。2定义一些其他的类(一些使用技巧)【Pizza 子类 NamedPizza【NamedPizza 子类 MargheritaPizza has at least one toppings ofMozzarellaToppi ng and TomatoTopp ing】【创建 AmericanaPizza通过克隆 MargheritaPizza因为他扩展了一个限制 PepperoniTopping【创建AmericanHotPizza通过克隆
26、 AmericanaPizza增加限制Jalape noPepperTopp ind【创建 SohoPizza 克隆 MargheritaPizza 增加 OliveTopping 和 Parmeza nTopp inQ4.10使用Reasoner (推理机):the reasoner shipped with Prot'eg'e is called Fact+.:两不中 hierarchy: In Prot'eg'e 4 the manually constructed' class hierarchy is called the asserted h
27、ierarchy. The class hierarchy that is automatically computed by the reasoner is called theinferred hierarchy .:主要功能: 1,判断一个类是否是另一个类的子类2, consistency checking (致性检测):【 为 了 使 用 推 理 机 , 我 们 先 定 义 一 个 矛 盾 的 类 ProbeInconsistentTopping , 让 他 既 是 CheeseTopping 又 是 VegetableTopping的子类,前提是这两个类是 disjoint的】 :I
28、f a class has been found to be inconsistent it 'icosn will be highlighted in red.【将 CheeseTopping VegetableTopping设为非 disjoint 的之后, 再Classify观察结果】4.11 充分必要条件( primitive class 和 defined class)All of the classes that we have created so far have only used necessary conditions to describe them.Neces
29、sary 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 定义了充要条件的类叫做 def
30、ined class【定义 Pizza的子类 CheesyPizza定义限制 hasTopping some CheeseTopping】将其转化为充分必要条件】【Classify我们可以看出defined class的不同】总结::if class A is now defined using necessary and sufficientcon diti ons, we can say that if an in dividual is a member of the class A it must satisfy the conditions and we can now say th
31、at if any (random) in dividual satis?es these con diti ons the n it must be a member of class A.4.12 Automated Classification (自动分类)为什么要使用Reasone。当我们创建了成百上千的类时,使用Reaso ner来自动计算子类父类之间的关系将是十分必要的。没有了 Reasoner我们很难保证 大规模本体的健壮性和逻辑性。自动分类这 项技术,使得本体可维护并且模块化,它不仅使得其他的本体和程序 能够reuse我们定义的本体,而且还最大限度的减少了使用者在建立 多继承类
32、时的错误。【使用OWLViz显示类的继承层次结构】4.13 Universal Restrictions( Quantifier Restrictions)【创建一个 Pizza的子类 VegetarianPizza 【增加限制 hasToppingonly (CheeseToppingpr VegtableToppingThis means that if something is a member of the classVegetarianPizza it is necessary for it to be a kind of Pizzaand it is necessary for i
33、t to only (universal quanti?er) have toppings that are kinds of CheeseToppingor kinds of VegetableTopping: 也可以没有,比如,中国现在实行计戈U牛 育,如果夫妻有了孩子那么只能有一个,但是这个夫妻也可以没有孩子。那么就不存在 only这个限制。【将上面的必要条件转化为充分条件】4.14 Automated Classification and Open World Reasoning 【使用推理机进行自动分类】我们 发现 MargheritaPizza 和 SohoPizza 并 没有被
34、归类 为 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),意思是,除非我们明确的 说明某个事物的存在,否则我
35、们就不能说他是存在的。分析上面的: 因为我们没有明确的指定他们只有奶酪和蔬菜顶, 那么他们就可以有 其他的顶部。这样的话,他们就不符合 VegetarianPizza 的充要条件 了。为了使这两种pizza只有蔬菜和奶酪顶部,我们就得在hasTopping上使用closure axiom (圭寸闭公理)(圭封闭公理)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 r
36、estrictions for the property 。【为 MargheritaPizza 的 hasTopping 添加圭闭公理 】【hasTopping only (MozzarellaTopping or TomatoTopping】)【为其他几个 pizza 使用更方便的方法添加封闭公理】现在我们可以说, MargheritaPizza 至少有一个 MozzarellaTopping 和 TomatoTopping , 并 且 the toppings must only be kinds of MozzarellaToppi ng or TomatoTopp ing【Class
37、ify之后我们看结果】4.15 Value PartitionsValue Partitionsare 他并不属于任何一种本体语言的一部分,而是 一种设计模式, 类似于面向对象程序设计中的设计模式。 它可以改善 我们对类的描述。【创建 thing 的子类 ValuePartition 】【 ValuePartition 的 子 类 SpicinessValuePartition ( Hot Medium Mild )】【创建 Object Property hasSpiciness 并使其 functional 】【为 SpicinessValuePartition 增加 covering a
38、xiom 在 equivalent 里面 输入 Hot or Medium or Mild】这种设计模式的效果我们可以看个对比图:disjoi nt(关键词)SpicinsViAil uePsrt it onSnicinRVa h iP Parr it imMediumMildWithout a covering axbmWith a covering axiomJ Spit iineiiVa I u ePar titloi ? q Cuyci ed byMild Medium. Hot)Figure 4*56: TIip HFiwt of using a covering axiom on
39、t ht1 Spiciness Value Partition4.16 Addi ng Spic in ess to Pizza Topp ings【对PepperTopping的所有子类设置必要条件hasSpiciness someHot 【定义 Pizza的子类 SpicyPizza设置必要条件: hasTopping some (PizzaTopp ingand hasSpic in esssome Hot)【将必要条件化为充要条件Fillter描述了一个匿名类,这个顶是 Pizzatopping并且特别辣。【Classifiy之后我们发现 AmericanHotPizza 成为了 Sp
40、icyPizza的子类4.17 Cardinality Restrictions (Owl 的 restriction 中的第二种) describe the class of individuals that have at least(min), atmost(max)or exactly a specified nu mber(exactly) of relati on ships with other in dividuals or datatype values.【创建Pizza的子类InterestingPizza定义必要条件hasToppingmin 3注意:我们这里 3 后面并
41、没有指定 fillter 是什么,代表可以是任意的individuals,等价于:hasToppingmin 3 Thing【转化为充要条件】【Classify之后观察。】4.18 Qualified (受限的)Cardinality Restrictions他比上面的 more specify【定义NamedPizza的子类FourCheesePizza定义必要条件hasTopping exactly 4 CheeseToppin】g5. Datatype Propertiesdescribe relationships between anindividual and data value
42、s.【现在来描述pizza所含的热量】【增加 Datatype Properties hasCalorificContentValue】【增加 in dividual ExampleMargherita 其 type 是 MargheritaPizza】 【为该对象增加 Data Property assertion 其中 type 选择 integer 值填写 250】【增加 in dividual ExampleSoho其 type 是 SohoPizza 【为该对象增加 Data Property assertion 其中 type 选择 integer 值填写 800】我们声明所有的p
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025宣传片、微电影、活动视频拍摄合同(模板)
- 2025购物中心店面装修合同范本
- 2025合同案例:合同期内解除劳动合同
- 买卖杨树合同范例
- 中石油五险一金合同范例
- 2025年终止租赁合同协议范本
- 哈弗大学考试试题及答案
- 农庄转让合同范例
- 济南公务员试题及答案
- 产科入科考试试题及答案
- 韦氏测试题及答案
- 历年贵州特岗试题及答案
- 2025怎样正确理解全过程人民民主的历史逻辑、实践逻辑与理论逻辑?(答案3份)
- 国家开放大学《工具书与文献检索》形考任务1-4参考答案及作业1
- GB/T 45501-2025工业机器人三维视觉引导系统通用技术要求
- 浅谈南京市区地形地貌和工程地质层构成
- 北师大版四年级数学下册第五单元 认识方程标准检测卷(含答案)
- 人工智能在环保领域的应用及挑战
- 2025年陕西省初中学业水平考试英语 例析与指导 试卷示例题答案及听力材料
- 泉州地理会考题目及答案
- 2025年工会知识竞赛题库200题及答案(完整版)
评论
0/150
提交评论