Browse Source

Fix bugs for non-zoopt option

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

+ 3
- 3
abducer/abducer_base.py View File

@@ -212,7 +212,7 @@ if __name__ == '__main__':
print()
kb = HED_prolog_KB()
abd = AbducerBase(kb, zoopt=True, multiple_predictions=True)
abd = AbducerBase(kb, zoopt=False, multiple_predictions=True)
consist_exs = [[1, '+', 0, '=', 0], [1, '+', 1, '=', 0], [0, '+', 0, '=', 1, 1]]
consist_exs2 = [[1, '+', 0, '=', 0], [1, '+', 1, '=', 0], [0, '+', 1, '=', 1, 1]] # not consistent with rules
inconsist_exs = [[1, '+', 0, '=', 0], [1, '=', 1, '=', 0], [0, '=', 0, '=', 1, 1]]
@@ -222,9 +222,9 @@ if __name__ == '__main__':
print(kb.consist_rule(consist_exs, rules), kb.consist_rule(consist_exs2, rules))
print()
res = abd.abduce((consist_exs, True, None))
res = abd.abduce((consist_exs, None, True))
print(res)
res = abd.abduce((inconsist_exs, True, None))
res = abd.abduce((inconsist_exs, None, True))
print(res)
print()


Loading…
Cancel
Save