From be9aa2cc897ce4ff8a42617f9707c179e0eeddbd Mon Sep 17 00:00:00 2001 From: "Dobbertin, Niclas" Date: Mon, 2 Sep 2024 08:12:53 +0200 Subject: update --- modeling/prod_numbers.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'modeling/prod_numbers.py') diff --git a/modeling/prod_numbers.py b/modeling/prod_numbers.py index b914b73..cbc87e7 100644 --- a/modeling/prod_numbers.py +++ b/modeling/prod_numbers.py @@ -8,6 +8,7 @@ def number(Model): string=""" =g> isa math_goal + op expand arg1 =num ones1 None expand_slot None @@ -30,6 +31,7 @@ def number(Model): string=""" =g> isa math_goal + op expand expand_slot arg1 arg1 =num =retrieval> @@ -50,13 +52,34 @@ def number(Model): ) prods.append(number_expand_arg1_done) + number_expand_arg1_fail = Model.productionstring( + name="number_expand_arg1_fail", + string=""" + =g> + isa math_goal + op expand + ones1 None + expand_slot arg1 + ?retrieval> + state error + ==> + =g> + isa math_goal + expand_slot None + ~retrieval> + """ + ) + prods.append(number_expand_arg1_fail) + number_expand_arg2 = Model.productionstring( name="number_expand_arg2", string=""" =g> isa math_goal + op expand arg2 =num + ones1 ~None ones2 None expand_slot None ?retrieval> @@ -73,11 +96,31 @@ def number(Model): ) prods.append(number_expand_arg2) + number_expand_arg2_fail = Model.productionstring( + name="number_expand_arg2_fail", + string=""" + =g> + isa math_goal + op expand + ones2 None + expand_slot arg2 + ?retrieval> + state error + ==> + =g> + isa math_goal + expand_slot None + ~retrieval> + """ + ) + prods.append(number_expand_arg2_fail) + number_expand_arg2_done = Model.productionstring( name="number_expand_arg2_done", string=""" =g> isa math_goal + op expand expand_slot arg2 arg2 =num =retrieval> @@ -89,6 +132,7 @@ def number(Model): ==> =g> isa math_goal + op done expand_slot None ones2 =one tens2 =ten -- cgit v1.2.3