Strange query behaviour in OWL!

时光毁灭记忆、已成空白 提交于 2019-12-01 21:41:16

The reason why the 2nd query "does not work" is Open World Assumption, and possibly also (the lack of) Unique Name Assumption.

Say you state:

John lives in Paris.
Mary lives in Paris.

The following questions are answered in the following way by an OWL reasoner.

Who lives in Paris?  John, Mary
Does at least one thing live in Paris?  YES
Do at least two things live in Paris?  Maybe
Is Paris a person?  Maybe
Is John and Mary the same thing?  Maybe
Is Paris and Mary the same thing?  Maybe
Does at most one thing live in Paris?  Maybe

Whenever the OWL reasoner comes back with a Maybe, the user interface (such as Protege) tends to show nothing.

In order to get the answers that you probably want, you need to add a lot more information to the knowledge base, e.g.

Mary is not John.
Everybody who lives in Paris is either John or Mary.

Hope this helps. Looking at how few views your recent questions have received on Stack Overflow, I'd say it's better to ask these questions on the Protege mailing list for the time being. Or even better, look at the mailing list archives. The Open World Assumption related questions come up at least once a week there.

To add to Kaarel's points and comment on your example query, a reasoner will look at the asserted triples you have and ask, "could there be other asserted triples, which I don't have at the moment, that assert this person has additional children which will put them over the 'three child' limit?" Since the answer to this question is "maybe", the reasoner will be unable to infer (as a fact) that the person in your example has a maximum of three children.

Negative assertions are quite hard for a reasoner to prove due to the open world assumption. Your "person must not have more than three children" query bumps into this issue. To achieve what you're looking for you could assert that the person types a class of parents who have three children or less. Then again, if you did that you probably wouldn't need the query in the first place.

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