From a7f70d2888fa346e0e5fd5192b1737240fbb7f42 Mon Sep 17 00:00:00 2001 From: kenkeiras Date: Wed, 24 May 2017 22:17:57 +0200 Subject: [PATCH] Unlock 7th GAC 100. --- naive-nlu/tree_nlu/tests/gac_100.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/naive-nlu/tree_nlu/tests/gac_100.py b/naive-nlu/tree_nlu/tests/gac_100.py index b5021ec..554c4b6 100644 --- a/naive-nlu/tree_nlu/tests/gac_100.py +++ b/naive-nlu/tree_nlu/tests/gac_100.py @@ -69,13 +69,21 @@ examples = [ "parsed": ("question", ("property-has-value", 'chile', 'location', 'south america')), "answer": True, + "after_execution": [( + lambda knowledge: _assert('south america' in knowledge.knowledge['chile']['location']) + ),], + }), + ('full_example', + { + "text": "Was Socrates a man?", + "affirmation": "Socrates was a man", + "parsed": ("question", + ("pertenence-to-group", 'socrates', 'man')), + "answer": True, + "after_execution": [( + lambda knowledge: _assert('man' in knowledge.knowledge['socrates']['groups']) + ),], }), - # { - # "text": "Was Socrates a man?", - # "affirmation": "Was Socrates a man?", - # "parsed": (), - # "answer": None, - # }, # { # "text": "Computers use electricity?", # "affirmation": "Computers use electricity?", @@ -666,7 +674,7 @@ base_knowledge = { }, 'chile': { "groups": {'noun'}, - } + }, } def main():