-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
lib/haskell/natural4/test/Testcases/LogicalEnglish/product/notes/product.pl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, _)). |
5 changes: 5 additions & 0 deletions
5
lib/haskell/natural4/test/Testcases/LogicalEnglish/product/product.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
12 changes: 12 additions & 0 deletions
12
lib/haskell/natural4/test/Testcases/LogicalEnglish/product/product.le
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |