简体   繁体   English

如何使用已定义类的最小属性限制推断 Protégé 中的实例?

[英]How to infer instances in Protégé with a minimum property restriction of a defined class?

I'm needing some explanation for an assignement.我需要对作业做一些解释。

I'm modeling a ontology for restaurants.我正在为餐厅建模一个本体。 The classes relevant to this question are dishes and Restaurant .与此问题相关的类是dishesRestaurant

The class dishes contain subclasses with the sort of dishes they serve.dishes包含子类以及它们所提供的菜式。 So for example class(dishes) has subclass(italian) .因此,例如class(dishes) has subclass(italian) To the subclass italian I've added instances like spaghetti .对于italian的子类,我添加了像spaghetti这样的实例。

The class restaurant contains mostly subclasses with necessary and sufficient restrictions to describe the type of restaurants based on the dishes they serve.类餐厅主要包含具有必要和充分限制的子类,以根据所提供的菜肴描述餐厅的类型。 But before a restaurant can get categorised I've got create instances with named restaurants.但是在对餐厅进行分类之前,我已经创建了带有命名餐厅的实例。 Take for example instance(pizzaFreddi) which is linked to the instance pizza through a property hasDish.以 instance(pizzaFreddi) 为例,它通过属性 hasDish 链接到实例披萨。 Because the instance Pizza belongs to italian the restriction on one of the defined subclasses of restaurant (with ItalianDishes) infers this instance.由于 Pizza 实例属于 italian,因此对餐厅(带有 ItalianDishes)的定义子类之一的限制推断出此实例。 This one works, I've used a some restriction.这个有效,我使用了一些限制。 But what I want to do is also create a defined subclass that infers instances(namedRestaurants) that have for example more than one location.但是我想做的是创建一个已定义的子类,用于推断具有多个位置的实例(namedRestaurants)。 The instance PizzaFreddi for example is linked with a property isLocatedIn to the city Amsterdam and Den Haag .例如,实例PizzaFreddi与属性 isLocatedIn 链接到城市AmsterdamDen Haag I've made a restriction that says: isLocatedIn min 2 City.我做了一个限制,上面写着:isLocatedIn min 2 City。 But this does not seem to infer the instance PizzaFreddi .但这似乎并不能推断出PizzaFreddi实例。 What's going wrong?怎么了?

I've added screenshots for explanation.我添加了屏幕截图以供解释。

http://i.stack.imgur.com/8sYNV.png http://i.stack.imgur.com/z8rT6.png http://i.stack.imgur.com/8sYNV.png http://i.stack.imgur.com/z8rT6.png

You have Equivalent Restaurant and min 2 hasLocation , it should be enough to have SubClassOf min 2 hasLocation as you already have Restaurant as a superclass.您有Equivalent Restaurant and min 2 hasLocation ,拥有SubClassOf min 2 hasLocation就足够了,因为您已经将 Restaurant 作为超类。 Also, Equivalent has sometimes nonintuitive consequences - I cannot tell if in this case it is a problem without the ontology.此外, Equivalent有时会产生非直观的后果 - 在这种情况下,如果没有本体,我无法判断这是否是一个问题。

Also, check the inferred hierarchy and make sure you're using a reasoner.此外,检查推断的层次结构并确保您使用的是推理器。 If you made changes after the reasoner was started, make sure to flush the reasoner so successive changes are seen.如果在推理器启动后进行了更改,请确保刷新推理器,以便看到连续的更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM