Protege Tutorial

Ontology Generation and Visualization with Protégé

Protege Tutorial

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

下图显示了将在本文末尾构建的最终本体层次结构。
Protege Tutorial

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

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

在Protégé中创建本体。

单击“Entities”选项卡。 单击时,默认情况下,您将进入“Classes”子选项卡。
Protege Tutorial

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

  1. Teachers teach modules
  2. Students study modules.
    有了这两个概念,可以识别以下类,数据属性,对象属性和个体。
    Protege Tutorial
    Protege Tutorial

Protege Tutorial

Protege Tutorial

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

创建Classes

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

Protege Tutorial

Protege Tutorial

创建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.
Protege Tutorial

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.
Protege Tutorial
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,
Protege Tutorial
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”.
Protege Tutorial

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”.

Protege Tutorial

  1. Add the data properties to the “Student_1”. Refer below image for more details.
  2. Protege Tutorial

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

Protege Tutorial

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