diff --git a/lib/haskell/natural4/test/Testcases/LogicalEnglish/product/notes/product.pl b/lib/haskell/natural4/test/Testcases/LogicalEnglish/product/notes/product.pl new file mode 100644 index 000000000..a6dae0e44 --- /dev/null +++ b/lib/haskell/natural4/test/Testcases/LogicalEnglish/product/notes/product.pl @@ -0,0 +1,13 @@ +:-module('product-prolog', []). +source_lang(en). +local_dict([is_twice_of, A, B], [x-x, y-y], [A, is, twice, of, B]). +local_meta_dict([],[],[]). +prolog_le(verified). +is_twice_of(A, B) :- + between(0, 100, B), + product_list([B, 2], A). +example(null, []). +example(istwice, [scenario([(product_list([_, 2], 'A'):-true)], true)]). +query(null, true). +query(q, is_twice_of(_, _)). +query(q1, between(0, 100, _)). diff --git a/lib/haskell/natural4/test/Testcases/LogicalEnglish/product/product.csv b/lib/haskell/natural4/test/Testcases/LogicalEnglish/product/product.csv new file mode 100644 index 000000000..67d29f105 --- /dev/null +++ b/lib/haskell/natural4/test/Testcases/LogicalEnglish/product/product.csv @@ -0,0 +1,5 @@ +GIVEN,x,IS A,Number, +,y,IS A,Number, +DECIDE,x,is twice of,y, +IF,x,IS,PRODUCT,y +,,,,2 \ No newline at end of file diff --git a/lib/haskell/natural4/test/Testcases/LogicalEnglish/product/product.le b/lib/haskell/natural4/test/Testcases/LogicalEnglish/product/product.le new file mode 100644 index 000000000..e96d8a880 --- /dev/null +++ b/lib/haskell/natural4/test/Testcases/LogicalEnglish/product/product.le @@ -0,0 +1,12 @@ +the target language is: prolog. + +the templates are: + *a x* is twice of *a y*. + +the knowledge base encoding includes: + a x is twice of a y + if y is between 0 & 100 + and x is the product of [y, 2]. + +query q is: + which number is twice of which other number.