1

I need to remove all of the assertions from the KB involving a specific constant, while leaving the constant itself intact (e.g "recreate constant").

Which Cyc query or SubL command I can use for this purpose?

Cyc KB - Research Cyc 4.0q.

1 Answers1

1

There's a SubL function for that:

(ke-recreate-now CONSTANT)

It will actually delete the constant completely, but then recreate it with the same name and guid.

If what you really want to is to delete most, but not all, of the assertions about CONSTANT, you need to somehow decide which ones you want to keep. If you have a set of predicates that you want to keep, you could do something like this:

(with-all-mts (do-gaf-arg-index (assert #$GeorgeWashington) 
  (clet ((*the-cyclist* #$CycAdministrator) 
         (keep? nil))
    (cdolist (pred '(#$isa #$argIsa #$genls))
      (pwhen (expression-find pred assert t)
        (csetq keep? t)))
    (punless keep? (ke-unassert-assertion-now assert)))))
KnowsStuff
  • 100
  • 7