From 19c6c346b86e2b073d3e2424f42650ce3a54ea12 Mon Sep 17 00:00:00 2001 From: troyyyyy <49091847+troyyyyy@users.noreply.github.com> Date: Mon, 5 Dec 2022 16:35:45 +0800 Subject: [PATCH] Add zoopt option --- abducer/kb.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/abducer/kb.py b/abducer/kb.py index 7ca8a25..4a0c9a0 100644 --- a/abducer/kb.py +++ b/abducer/kb.py @@ -226,20 +226,7 @@ class prolog_KB(KBBase): candidate[idx] = c[i] candidates.append(candidate) return candidates - - def address_by_idx2(self, pred_res, key, address_idx): - candidates = [] - query_string = self.get_query_string(pred_res, address_idx) - abduce_c = [list(z.values()) for z in list(self.prolog.query(query_string % key))] - # print('abduce_c:', abduce_c) - for c in abduce_c: - candidate = pred_res.copy() - for i, idx in enumerate(address_idx): - candidate[idx] = c[i] - candidates.append(candidate) - return candidates - - + class add_prolog_KB(prolog_KB):