我目前正在学习如何将符号 3 中的规则与 CWM 结合使用。 我想建立一个规则,将继子女纳入家庭本体中。因此,继子女是某人的 child ,但不是某人配偶的 child 。
@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}.
我不太明白如何使用 notInincludes... 另外,我错过了 ?p1 :hasHusband ?p2 语句,但它甚至不能像那样工作。
有人知道我怎样才能让它发挥作用吗?
最佳答案
您必须指定数据集以及失败否定的应用范围。请参阅https://www.w3.org/2000/10/swap/doc/paper/#neg23供引用。
关于semantic-web - 如何使用:notIncludes in Notation 3 rules?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47275302/