All, I'm trying to write a rule that will find a duplicate value in a multi-slot field in facts. The facts were imported from Protege 3.4.3 and are automatically defined. I'm running Jess 7.1 from within Protege.
This is the rule I have defined: (defrule duplicate "This rule will search to find the same slot value in SRSontology#name" ?fact1 <- (object (http://pluto.cse.msstate.edu/rae20/SRSontology#name ?sr1)) ?fact2 <- (object {is-a-name == fact1.is-a-name} (http://pluto.cse.msstate.edu/rae20/SRSontology#name ?sr2&: (= ?sr2 ?sr1))) =>(printout t "Found Duplicate Name " ?sr1 "xxxxx" ?sr2 crlf)) (run) This rule fires but does not find the two facts which I have deliberately assigned the same value in slot "SRSontology#name". I'm testing using only five facts. "Requirement1" is the duplicate value placed in two of the five facts. This is the Jess output: Found Duplicate Requirements PROD00001xxxxxPROD00001 Found Duplicate Requirements I 1xxxxxI 1 Found Duplicate Requirements Requirement1xxxxxRequirement1 Found Duplicate Requirements Requirement1xxxxxRequirement1 Found Duplicate Requirements Requirement1xxxxxRequirement1 Found Duplicate Requirements Requirement1xxxxxRequirement1 6 Thanks for any assistance. ______________________________ Robert
