问题描述
我已经在本体中建立了以下模型:
I have modelled the following in my Ontology:
俱乐部雇用一些球员,球员具有国籍一些国籍,球员具有国家状态值National_Player,国家/地区等效于国籍.
Club employs some Player, Player hasNationality some Nationality, Player hasNationalStatus value National_Player, Country is equivalent to Nationality.
我希望本体论能够推断出这一点:
I want the Ontology to infer that:
如果某个玩家具有某个国籍的国籍,并且该玩家具有NationalStatus值National_Player,则Country(与该玩家具有的国籍相同)将雇用该玩家.
If a Player hasNationality some Nationality and, Player hasNationalStatus value National_Player then, Country(Same as the nationality the player has) employs Player.
例如:
{Steven_Gerrard}的国籍值为英格兰,而{Steven_Gerrard}的国籍值为National_Player,因此{England}使用了[Steven_Gerrard}.
{Steven_Gerrard} hasNationality value England and, {Steven_Gerrard} hasNationalStatus value National_Player therefore, {England} employs [Steven_Gerrard}.
是否可以将这种知识添加到Protege中?
Is there a possible way to add this knowledge to Protege?
谢谢.
错误消息:
错误42记录于2014年4月1日星期二20:49:24
Error 42 Logged at Tue Apr 01 20:49:24 BST 2014
OWLReasonerRuntimeException:非简单对象属性' http: //www.semanticweb.org/u1cjd/ontologies/2014/1/untitled-ontology-2#employs '被用作简单的
OWLReasonerRuntimeException: Non-simple object property 'http://www.semanticweb.org/u1cjd/ontologies/2014/1/untitled-ontology-2#employs' is used as a simple one
和
错误43记录于2014年4月1日星期二20:49:24ReasonerInternalException:tRole.cpp:243:断言'Ancestor.empty()&& Descendant.empty()'失败
Error 43 Logged at Tue Apr 01 20:49:24 BST 2014ReasonerInternalException: tRole.cpp:243: assertion 'Ancestor.empty() && Descendant.empty()' fails
推荐答案
这是可能的,它实际上与我在对上一个问题,此答案的结构几乎与我对最近答案的回答相同.semanticweb.com问题,来自空白节点的OWL属性推断-建模.
This is possible, and it's actually very similar to the technique I mentioned in an answer to your previous question, Adding statements of knowledge to an OWL Ontology in Protege), and the structure of this answer is almost identical to my answer to a recent answers.semanticweb.com question, OWL property inference from blank node - modelling.
您只需要使用一些 rolification 和一个财产链公理.需要注意的一点是,现有数据具有上方箭头的形式,而所需信息位于下方箭头.
You just need to use some rolification and a property chain axiom. The point to note is that the existing data has the form of the upper arrows, and the desired information is in the lower arrows.
仅仅赋予雇员子财产 hasNationality 是不够的,因为您要确保玩家具有特定的国家地位.这是您需要熏陶的地方.您希望雇员拥有 hasNationality • p ,其中 p 是一种特殊属性,仅将具有国家身份的玩家与自己联系起来.您可以通过旋转来做到这一点.只需声明一个新的对象属性 R 并声明公理
It's not enough to give employs the subproperty hasNationality, because you want to ensure that the player has a particular national status. This is where you need rolification. You want employs to have a subproperty chain of hasNationality • p, where p is a special property that only relates players with national status to themselves. You can do that with rolification. Just declare a new object property R and assert the axioms
- 具有NationalStatus 值 National_Player 等效于 R_NationalPlayer some Self
- 逆(具有国籍) o R_NationalPlayer subPropertyOf 雇用
- hasNationalStatus value National_Player EquivalentTo R_NationalPlayer some Self
- inverse(hasNationality) o R_NationalPlayer subPropertyOf employs
在描述逻辑语法中,这些类似于:
In the description logic syntax, these would be something like:
- = hasNationalStatus.National_Player≡ ∃ R .自我
- hasNationality • R ⊑雇用
- =hasNationalStatus.National_Player ≡ ∃R.Self
- hasNationality • R ⊑ employs
这在某些推理机中将起作用,但不幸的是,这确实使我们脱离了OWL 2 DL,并进入了完整的OWL.在此答案的评论中对此进行了详细讨论.如更新问题中的错误消息所示,雇员现在是非简单属性,用于仅应使用简单属性的地方.有关如何创建属性的更多信息,请参见 11.1属性层次结构和简单对象属性表达式.简单与否,请 11.2关于公理闭包的限制以获取有关属性的更多信息可以出现在哪里.
This will work in some reasoners, but unfortunately, this does bring us out of OWL 2 DL and into OWL full. This was discussed in some detail in the comments on this answer. As the error message in the updated question indicates, employs is now a non-simple property, and used in a place where only simple properties should be used. See 11.1 Property Hierarchy and Simple Object Property Expressions for more about what makes a property simple or not, and 11.2 The Restrictions on the Axiom Closure for more about properties can appear where.
但是,听起来您正在使用支持SWRL规则的推理机,在这种情况下,您可以简单地添加规则:
However, it sounds like you're using a reasoner that supports SWRL rules, in which case you could simply add the rule:
这篇关于使用属性链获取OWL本体中的推断知识(Protege)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!