How to create multiple relations with same object property?

…衆ロ難τιáo~ 提交于 2020-01-11 11:48:45

问题


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.

How can I model this mapping??


回答1:


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

If you want to define relations such as

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

then define the following relations:

  • 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

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

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



来源:https://stackoverflow.com/questions/51298192/how-to-create-multiple-relations-with-same-object-property

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!