Protege Tutorial

Ontology Generation and Visualization with Protégé

在这里插入图片描述

在本文中,期望读者对本体和本体规范有基本的了解。 以下部分说明了使用Protégé编辑器生成和可视化本体,并涵盖了基本的本体定义概念。 我们将研究创建一个简单的大学本体,然后通过使用VOWL插件在Protégé编辑器中对其进行可视化。

下图显示了将在本文末尾构建的最终本体层次结构。
在这里插入图片描述

什么是Protégé以及如何设置它

Protégé是由斯坦福大学开发的用于构建智能系统的免费开源本体编辑器。 Protégé得到了强大的学术,政府和企业用户的支持,他们使用Protégé在生物医学,电子商务和组织建模等多个领域构建基于知识的解决方案。
按照以下步骤启动并运行Protégé。
从这里下载Protégé并将其解压缩。https://protege.stanford.edu/
进入解压缩的文件夹,然后单击protege.exe运行Protégé。

在Protégé中创建本体。

单击“Entities”选项卡。 单击时,默认情况下,您将进入“Classes”子选项卡。
在这里插入图片描述

在这个例子中,我们将研究基于大学中非常基本的概念/场景创建本体。

  1. Teachers teach modules
  2. Students study modules.
    有了这两个概念,可以识别以下类,数据属性,对象属性和个体。
    在这里插入图片描述
    在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

为简单起见,某些数据属性意图被省略。
下一步涉及在本体中创建标识的类,数据属性,对象属性。

创建Classes

单击“class”选项卡,然后打开类层次结构。
请注意,上面标识的所有类都是默认的“Thing”类的子类。
单击“Add subclass”图标,然后在弹出菜单中输入类的名称。
同样可以通过以下方法快速添加:
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

创建Object Properties

创建对象属性,请选择“Object Properties”选项卡,然后单击“Add sub property”图标。 请注意,默认情况下,所有属性都是“topObjectProperty”的子属性。

However it should be noted that we can add domain and range to these object properties.
Syntactically, domain is a built-in property that links a property to a class description. An domain axiom asserts that the subjects of such property statements must belong to the class extension of the indicated class description.
Range is a built-in property that links a property to to either a class description or a data range. An range axiom asserts that the values of this property must belong to the class extension of the class description or to data values in the specified data range.

Hence for the object property “studies” we can add “Student” as the domain and “Module” as the range.
在这里插入图片描述

In the same way, for the object property “teaches” we can add “Teacher” as the domain and “Module” as the range.

Creating Data Properties

The next step is to create the identified data properties in Figure 5. To do this, simply click on the “Data Properties” tab and click “Add sub property” icon. Note that all properties will be sub properties of the “topDataProperty” by default.
在这里插入图片描述
In the same way, we did with object properties, we can define domain and range for each data property as well. However, in the range selection, rather having a class description,need to add a data types. For an example,
“first_name” data property has the range of “xsd:string”.
To add this data types click on the + button near “Range”and select “Built in data types” and select the relevant data type from the given list.

创建实例(Individuals)

The final task in creating the ontology is adding individuals. To do this,
在这里插入图片描述
First, let’s create a “Module” individual. Follow the below steps to set the individual properly.
First, let’s create a “Module” individual. Follow the below steps to set the individual properly.
Create the “Module” individual “CS2341”.
Add the Type for the “CS2341” as “Module”.
在这里插入图片描述

Do the same for other two modules “CS4032” and “MA4124”.

Secondly, let’s add individual “Student_1”. Follow the below steps to set the individual properly.
Create the individual “Student_1”.
Add the Type for the “Student_1” as “Student”.
Add the object properties for “Student_1”.

在这里插入图片描述

  1. Add the data properties to the “Student_1”. Refer below image for more details.
  2. 在这里插入图片描述

If you have completed the above steps correctly, Congratulations!! you just created the university ontology. Now the next step is visualization of the created ontology. Alternatively you could download the created ontology as an OWL file by File → Save As → OWL/XML Syntax.

可视化结果

你可以下载可视化插件并将其放入protege 的插件文件夹后重启。内也可以直接用插件Onto Graf

在这里插入图片描述

参考:https://medium.com/@vindulajayawardana/ontology-generation-and-visualization-with-prot%C3%A9g%C3%A9-6df0af9955e0
blog大部分参考以上文章,但部分操作从其他博文中学习获得,是整合版本,并不是直接翻译版本。

欢迎加入:人工智能学习圈
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值