如何创建具有相同对象属性的多个关系? [英] How to create multiple relations with same object property?

查看:106
本文介绍了如何创建具有相同对象属性的多个关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用protege 5开发本体.我已经创建了has_composition作为对象属性.在我的本体中,相同的object_property用于不同的域及其各自的范围,例如A的has_composition是B,C的has_composition是D,E和F.

I am using protege 5 for developing ontology. I have created has_composition as object property. In my ontology the same object_property is used for different domains and their respective range, like has_composition of A is B and has_composition of C and D is E and F.

如何为该映射建模?

推荐答案

OWL(本体Web语言,定义本体的本体)不允许对您要尝试的操作进行建模.

OWL (Ontology Web Language, the ontology that defines ontologies) does not allow to model what you're trying to do.

我可以想到的解决方法是使用子属性.想象一下以下课程:

A workaround I can think of is to use sub-properties. Imagine the following classes:

  • Pizza
  • TomatoSauce
  • ChocolateCake
  • Chocolate
  • Pizza
  • TomatoSauce
  • ChocolateCake
  • Chocolate

如果您想定义诸如这样的关系

If you want to define relations such as

  • A Pizza has_composition TomatoSauce
  • A ChocolateCake has_composition Chocolate
  • A Pizza has_composition TomatoSauce, and
  • A ChocolateCake has_composition Chocolate

然后定义以下关系:

  • has_composition:无域也无范围(或例如DishIngredient之类的通用超类)
    • has_tomato_sauce:域Pizza,范围TomatoSauce
    • has_chocolate:域ChocolateCake,范围Chocolate
    • has_composition: No domain nor range (or a common superclass such as Dish and Ingredient for example)
      • has_tomato_sauce: Domain Pizza, range TomatoSauce
      • has_chocolate: Domain ChocolateCake, range Chocolate

      这将允许推理机(计算推断的软件)推断出,如果something has_chocolate a_chocolate,则

      This will allow the reasoner (the software that computes inferences) to infer that if something has_chocolate a_chocolate, then

      • something rdf:type Chocolate(由has_chocolate的域推断);
      • something has_composition a_chocolate(因为has_chocolatehas_composition的子属性).
      • something rdf:type Chocolate (inferred by the domain of has_chocolate);
      • something has_composition a_chocolate (because has_chocolate is a sub-property of has_composition).

      您可以在我制作的这个要点中查看该示例.

      You can check out this example in this Gist I made.

      下载它,打开它,然后启动推理机.您将看到黄色的推断的语句.

      Download it, open it, and start the reasoner. You will see the inferred statements in yellow.

      这篇关于如何创建具有相同对象属性的多个关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆