1.该博文所用到的ontology文件可以在博主的资源共享当中使用积分进行下载

2.为什么需要ontology

所谓语义(2)

所谓语义(2)

以上5条是对为什么需要本体的一个很全面的回答。

3.本体的构建方法(七步法)

所谓语义(2)

4.实际开发本体所经过的步骤

3中提出的方法是一种一般化的方法,但真正开发本体的时候往往要经过以下一些步骤

所谓语义(2)

5.使用七步法手工构建一个university的本体

5.1 Determine domain and scope(确定领域和范围)

这一步需要考虑以下问题

所谓语义(2)

所谓语义(2)

在university本体中设置的 competency questions如下:

Domain: Universityeducational

Competency questions:

  1.Howmany professors there are for a certain degree program?

  2.Howmany students follow a course?

  3.Whatare the subjects?

  4.Whichdegree a university offers

  5.Whoteaches a specific course

  6.Whatis the schedule of a course

  7.……

5.2 consider reuse(考虑复用现有本体)

所谓语义(2)

该例子没有复用任何已有本体……

5.3  Enumerate important terms(列举重要的专业术语)

University

Course

Degree Type/Level

Schedule

Teacher

Student

Degree Program

Teaches

Offers

credits

course hours

enrolled

person id

……

5.4 Define classes and their hierarchy(定义类和层次结构)

5.5 Define properties(定义属性,包括object property和dataproperty)

5.6 Define constraints(定义约束和限制)

5.7 Create instances(创建实例)

注意,上面这四部直接在protege中实现,具体请参考博主共享资源当中的university_press.owl文件。在这一步有一个技巧可以使用,就是在

整个过程中可以打开reasoner,这样的话,推理机可以事实检测你所构建本体的一致性(consistency),如下图所示,当你的操作不满足一致性的时候,推理机会提示你,然后点击Explain按钮,推理机会帮你解释导致不一致性出现的原因。

所谓语义(2)

所谓语义(2)

6  推理机初体验

所谓语义(2)

上图中,笔者有意在Thing类中添加了一个instance是“University2”,且设置其object property和Data property。然后推理机就识别出来了University2这个instance其实是属于University这个类,如图所示(当然此时你的推理机是打开的),reasoner之所以能够识别到该问题,是因为Universtiy2和Universtiy1的属性相似,所以他认为这两个instance应该是属于一个class。

7. SWRL书写规则,利用reasoner进行推理

7.1 推理前如下图所示

所谓语义(2)

7.2 SWRL规则的添加,如下图所示

所谓语义(2)

7.3 利用新规则和推理机推理之后

所谓语义(2)




相关文章: