Browse Source

Add zoopt option

pull/3/head
troyyyyy GitHub 3 years ago
parent
commit
19c6c346b8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 14 deletions
  1. +1
    -14
      abducer/kb.py

+ 1
- 14
abducer/kb.py View File

@@ -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):


Loading…
Cancel
Save