《语义网与知识图谱》实验手册
实验三 本体建模与本体语言 OWL
目的:
(1) 熟悉本体建模工具 Protégé,并掌握用 Protégé 建立本体模型;
(2) 了解和熟悉 OWL 语言的基本语法,掌握采用 OWL 语言进行本体描述。
内容:
【习题 1】 在 eLearning 系统或 Protégé 官网下载 Protégé 5.5,并进行安装。在 eLearning 系
统下载 Protégé 使用指南,参考使用指南熟悉 Protégé 的用法。
【习题 2】 Use OWL DL to model the following sentences.
The class Vegetable is a subclass of PizzaTopping.
The class PizzaTopping does not share any elements with the class Pizza.
The individual aubergine is an element of the class Vegetable.
The abstract role hasTopping is only used for relationships between elements of the classes
Pizza and PizzaTopping.
The class VegPizza consists of those elements which are in the class NoMeatPizza and in the
class NoFishPizza.
The role hasTopping is a subrole of hasIngredient.
答:
1. <owl:class rdf : ID="Vegetable">
<rdfs : subClassOf rdf : resource="http://www.example.org/PizzaTopping" / >
</ owl:class>
2. <owl:class rdf : ID="PizzaTopping ">
<owl:disjointWith rdf: resource="#Pizza"/>
</ owl: class>
3.<owl: NamedIndividual rdf : ID="aubergine">
<rdf:type rdf:resource="#Vegetable" />
</ owl : NamedIndividual>
4.<owl:ObjectProperty rdf : ID="hasTopping">
<rdfs : domain rdf : resource="#Pizza" />
<rdfs :range rdf :resource="#PizzaTopping" />
</ owl:NamedIndividual>
5.<owl:class rdf : ID="VegPizza">
<owl: unionOf rdf : parseType="collection" />
<owl:class rdf :about="#NoMeatPizza" />
评论0