我目前正在学习如何将 Notation 3 中的规则与 CWM 一起使用。我想建立一个规则,在家庭本体中给继子。因此,继子是某人的孩子,而不是该人配偶的孩子。
@prefix ex: <http://www.smith-family.com/familyOntology.owl#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
{
?p1 :hasWife ?p2 .
?p2 :hasChild ?c .
: log:notIncludes {?p1 :hasChild ?c}
}
=> {?p1 :hasStepChild ?c}.
我真的不明白如何使用 notIncludes... 另外,我想念 ?p1 :hasHusband ?p2 语句,但它甚至不能那样工作。
有谁知道我怎样才能让它工作?