2

I'm currently learning how to use the rules in Notation 3 with CWM. I want to build a rule that gives the stepchilds in a family ontology. So, the stepchild is the child of someone but not the child of this someone's spouse.

@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}.

I don't really understand how to use notIncludes... Also, I miss the ?p1 :hasHusband ?p2 statement, but it even does not work like that.

Does anyone know how I could make it work?

WSH
  • 331
  • 1
  • 2
  • 10

1 Answers1

2

You have to specify the dataset and what the negation as failure is applied to. See https://www.w3.org/2000/10/swap/doc/paper/#neg23 for reference.

Leslie Sikos
  • 529
  • 2
  • 7