Advertisement
logicmoo

Untitled

Sep 19th, 2014
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ZXBasic 30.10 KB | None | 0 0
  1.  
  2. % =========================================================================================================
  3.  
  4. %                       [how,large,is,the,smallest,american,country,?]
  5.  
  6. % ---------------------------------------------------------------------------------------------------
  7.  
  8. Sentence(report): 0sec.
  9. [w(how,open),w(large,open),w(is,open),w(the,open),w(smallest,open),w(american,open),w(country,open),w(?,open)]
  10.  
  11. POS Sentence(report): 0sec.
  12. [w(how,open),w(large,open),w(is,open),w(the,open),w(smallest,open),w(american,open),w(country,open),w(?,open)]
  13.  
  14. Parse: 0.002999999999985903sec.
  15. whq(A, s(np(3+sg, np_head(det(the(sg)), [sup(most, adj(small)), adj(american)], country), []), verb(be, active, pres+fin, [], POS(B), be), [arg(pred, value(adj(large), wh(A)))], [])) :-
  16.         whq(A,
  17.             s(np(3+sg,
  18.                  np_head(det(the(sg)),
  19.                          [sup(most, adj(small)), adj(american)],
  20.                          country),
  21.                  []),
  22.               verb(be, active, pres+fin, [], POS(B), be),
  23.               [arg(pred, value(adj(large), wh(A)))],
  24.               [])).
  25.  
  26. %       good_kyqdhq(np(3+sg,np_head(det(the(sg)),[sup(most,adj(small)),adj(american)],country),[]),np_head(det(the(sg)),[sup(most,adj(small)),adj(american)],country),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  27. %       good_kyqdhq(np(3+sg,np_head(det(the(sg)),[sup(most,adj(small)),adj(american)],country),[]),np_head(det(the(sg)),[sup(most,adj(small)),adj(american)],country),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  28. % var_simplify((answer80([A]):-B^ ((C^ (setof(D:E, (country(E), (areaOf(E,D),american(E),true),true),C),aggregate(min,C,B)),true),true,true,areaOf(B,A),true)),F)
  29.  
  30. Semantics: 0.0010000000000047748sec.
  31. answer80([B]) :-
  32.    exists C
  33.      exists D
  34.        D = setof E:F
  35.          country(F)
  36.        & areaOf(F,E)
  37.        & american(F)
  38.      & aggregate(min,D,C)
  39.    & areaOf(C,B)
  40.  
  41. Reply: 0.001999999999995339sec.
  42. [--(0,ksqmiles)]
  43.  
  44. % ---------------------------------------------------------------------------------------------------
  45.  
  46. % ---------------------------------------------------------------------------------------------------
  47.  
  48. %                       [how,large,is,the,smallest,american,country,?]
  49.  
  50. % =========================================================================================================
  51.  
  52. % =========================================================================================================
  53.  
  54. %                       [what,is,the,ocean,that,borders,african,countries,AND,that,borders,asian,countries,?]
  55.  
  56. % ---------------------------------------------------------------------------------------------------
  57.  
  58. Sentence(report): 0sec.
  59. [w(what,open),w(is,open),w(the,open),w(ocean,open),w(that,open),w(borders,open),w(african,open),w(countries,open),w(AND,open),w(that,open),w(borders,open),w(asian,open),w(countries,open),w(?,open)]
  60.  
  61. POS Sentence(report): 0sec.
  62. [w(what,open),w(is,open),w(the,open),w(ocean,open),w(that,open),w(borders,open),w(african,open),w(countries,open),w(AND,open),w(that,open),w(borders,open),w(asian,open),w(countries,open),w(?,open)]
  63.  
  64. Parse: 0.006000000000000227sec.
  65. whq(A, s(np(3+sg, wh(A), []), verb(be, active, pres+fin, [], POS(D), be), [arg(dir, np(3+sg, np_head(det(the(sg)), [], ocean), [conj(AND, rel(B, s(np(3+sg, wh(B), []), verb(BORDER, active, pres+fin, [], POS(E), tv), [arg(dir, np(3+pl, np_head(generic, [adj(african)], country), []))], [])), rel(C, s(np(3+sg, wh(C), []), verb(BORDER, active, pres+fin, [], POS(F), tv), [arg(dir, np(3+pl, np_head(generic, [adj(asian)], country), []))], [])))]))], [])) :-
  66.         whq(A,
  67.             s(np(3+sg, wh(A), []),
  68.               verb(be, active, pres+fin, [], POS(D), be),
  69.  
  70.               [ arg(dir,
  71.                     np(3+sg,
  72.                        np_head(det(the(sg)), [], ocean),
  73.  
  74.                        [ conj(AND,
  75.                               rel(B,
  76.                                   s(np(3+sg, wh(B), []),
  77.                                     verb(BORDER,
  78.                                          active,
  79.                                          pres+fin,
  80.                                          [],
  81.                                          POS(E),
  82.                                          tv),
  83.  
  84.                                     [ arg(dir,
  85.                                           np(3+pl,
  86.                                              np_head(generic,
  87.                                                      [adj(african)],
  88.                                                      country),
  89.                                              []))
  90.                                     ],
  91.                                     [])),
  92.                               rel(C,
  93.                                   s(np(3+sg, wh(C), []),
  94.                                     verb(BORDER,
  95.                                          active,
  96.                                          pres+fin,
  97.                                          [],
  98.                                          POS(F),
  99.                                          tv),
  100.  
  101.                                     [ arg(dir,
  102.                                           np(3+pl,
  103.                                              np_head(generic,
  104.                                                      [adj(asian)],
  105.                                                      country),
  106.                                              []))
  107.                                     ],
  108.                                     [])))
  109.                        ]))
  110.               ],
  111.               [])).
  112.  
  113. %       good_kyqdhq(np(3+sg,wh(A),[]),wh(A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  114. %        good_kyqdhq(np(3+sg,np_head(det(the(sg)),[],ocean),[conj(AND,rel(A,s(np(3+sg,wh(A),[]),verb(BORDER,active,pres+fin,[],POS(B),tv),[arg(dir,np(3+pl,np_head(generic,[adj(african)],country),[]))],[])),rel(C,s(np(3+sg,wh(C),[]),verb(BORDER,active,pres+fin,[],POS(D),tv),[arg(dir,np(3+pl,np_head(generic,[adj(asian)],country),[]))],[])))]),np_head(det(the(sg)),[],ocean),E,quant(F,G,H,I,J,E),F,G,H,I,J)
  115. %                 good_kyqdhq(np(3+sg,wh(feature&place&seamass-A),[]),wh(feature&place&seamass-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  116. %                  good_kyqdhq(np(3+pl,np_head(generic,[adj(african)],country),[]),np_head(generic,[adj(african)],country),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  117. %                 good_kyqdhq(np(3+sg,wh(feature&place&seamass-A),[]),wh(feature&place&seamass-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  118. %                  good_kyqdhq(np(3+pl,np_head(generic,[adj(african)],country),[]),np_head(generic,[adj(african)],country),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  119. %                 good_kyqdhq(np(3+sg,wh(feature&place&seamass-A),[]),wh(feature&place&seamass-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  120. %                  good_kyqdhq(np(3+pl,np_head(generic,[adj(asian)],country),[]),np_head(generic,[adj(asian)],country),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  121. %                 good_kyqdhq(np(3+sg,wh(feature&place&seamass-A),[]),wh(feature&place&seamass-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  122. %                  good_kyqdhq(np(3+pl,np_head(generic,[adj(asian)],country),[]),np_head(generic,[adj(asian)],country),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  123. % var_simplify((answer80([A]):-B^ (((ocean(B),true), ((C^ (((country(C),true),african(C),true), ((true,true),true), (true,borders(B,C),true,true),true),true),D^ (((country(D),true),asian(D),true), ((true,true),true), (true,borders(B,D),true,true),true),true),true), ((true,true),true),true,A=B,true,true)),E)
  124.  
  125. Semantics: 0.027000000000001023sec.
  126. answer80([B]) :-
  127.    ocean(B)
  128.  & exists C
  129.      country(C)
  130.    & african(C)
  131.    & borders(B,C)
  132.  & exists D
  133.      country(D)
  134.    & asian(D)
  135.    & borders(B,D)
  136.  
  137. Planning: 0.000999999999990564sec.
  138. answer80([B]) :-
  139.    exists C D
  140.      ocean(B)
  141.    & { borders(B,C)
  142.      & {african(C)}
  143.      & {country(C)} }
  144.    & { borders(B,D)
  145.      & {asian(D)}
  146.      & {country(D)} }
  147.  
  148. Reply: 0.0010000000000047748sec.
  149. [indian_ocean]
  150.  
  151. % ---------------------------------------------------------------------------------------------------
  152.  
  153. % ---------------------------------------------------------------------------------------------------
  154.  
  155. %                       [what,is,the,ocean,that,borders,african,countries,AND,that,borders,asian,countries,?]
  156.  
  157. % =========================================================================================================
  158.  
  159. % =========================================================================================================
  160.  
  161. %                       [what,are,the,capitals,of,the,countries,bordering,the,baltic,?]
  162.  
  163. % ---------------------------------------------------------------------------------------------------
  164.  
  165. Sentence(report): 0sec.
  166. [w(what,open),w(are,open),w(the,open),w(capitals,open),w(of,open),w(the,open),w(countries,open),w(bordering,open),w(the,open),w(baltic,open),w(?,open)]
  167.  
  168. POS Sentence(report): 0sec.
  169. [w(what,open),w(are,open),w(the,open),w(capitals,open),w(of,open),w(the,open),w(countries,open),w(bordering,open),w(the,open),w(baltic,open),w(?,open)]
  170.  
  171. Parse: 0.2909999999999968sec.
  172. whq(A, s(np(3+pl, wh(A), []), verb(be, active, pres+fin, [], POS(C), be), [arg(dir, np(3+pl, np_head(det(the(pl)), [], capital), [pp(prep(of), np(3+pl, np_head(det(the(pl)), [], country), [reduced_rel(B, s(np(3+pl, wh(B), []), verb(BORDER, active, inf, [prog], POS(D), tv), [arg(dir, np(3+sg, nameOf(baltic), []))], []))]))]))], [])) :-
  173.         whq(A,
  174.             s(np(3+pl, wh(A), []),
  175.               verb(be, active, pres+fin, [], POS(C), be),
  176.  
  177.               [ arg(dir,
  178.                     np(3+pl,
  179.                        np_head(det(the(pl)), [], capital),
  180.  
  181.                        [ pp(prep(of),
  182.                             np(3+pl,
  183.                                np_head(det(the(pl)), [], country),
  184.  
  185.                                [ reduced_rel(B,
  186.                                              s(np(3+pl, wh(B), []),
  187.                                                verb(BORDER,
  188.                                                     active,
  189.                                                     inf,
  190.                                                     [prog],
  191.                                                     POS(D),
  192.                                                     tv),
  193.  
  194.                                                [ arg(dir,
  195.                                                      np(3+sg,
  196.                                                         nameOf(baltic),
  197.                                                         []))
  198.                                                ],
  199.                                                []))
  200.                                ]))
  201.                        ]))
  202.               ],
  203.               [])).
  204.  
  205. %       good_kyqdhq(np(3+pl,wh(A),[]),wh(A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  206. %        good_kyqdhq(np(3+pl,np_head(det(the(pl)),[],capital),[pp(prep(of),np(3+pl,np_head(det(the(pl)),[],country),[reduced_rel(A,s(np(3+pl,wh(A),[]),verb(BORDER,active,inf,[prog],POS(B),tv),[arg(dir,np(3+sg,nameOf(baltic),[]))],[]))]))]),np_head(det(the(pl)),[],capital),C,quant(D,E,F,G,H,C),D,E,F,G,H)
  207. %           good_kyqdhq(np(3+pl,np_head(det(the(pl)),[],country),[reduced_rel(A,s(np(3+pl,wh(A),[]),verb(BORDER,active,inf,[prog],POS(B),tv),[arg(dir,np(3+sg,nameOf(baltic),[]))],[]))]),np_head(det(the(pl)),[],country),C,quant(D,E,F,G,H,C),D,E,F,G,H)
  208. %                 good_kyqdhq(np(3+pl,wh(feature&city-A),[]),wh(feature&city-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  209. %                  good_kyqdhq(np(3+sg,nameOf(baltic),[]),nameOf(baltic),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  210. %                 good_kyqdhq(np(3+pl,wh(feature&city-A),[]),wh(feature&city-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  211. %                   good_kyqdhq(np(3+pl,wh(feature&place&country-A),[]),wh(feature&place&country-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  212. %                    good_kyqdhq(np(3+sg,nameOf(baltic),[]),nameOf(baltic),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  213. %                   good_kyqdhq(np(3+pl,wh(feature&place&country-A),[]),wh(feature&place&country-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  214. %                    good_kyqdhq(np(3+sg,nameOf(baltic),[]),nameOf(baltic),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  215. % var_simplify((answer80([A]):-B^ (setof([C]:D, ((((((true,true),true), ((true,true),true),country(C), (true,borders(C,baltic),true,true),true),true),true),setof(E, ((capital(C,E),true,true),true),D)),B), ((true,true),true),true,A=B,true,true)),F)
  216.  
  217. Semantics: 0.024999999999991473sec.
  218. answer80([B]) :-
  219.    B = setof [C]:D
  220.      country(C)
  221.    & borders(C,baltic)
  222.    & D = setof E
  223.        capital(C,E)
  224.  
  225. Reply: 0.0010000000000047748sec.
  226. [[[denmark]:[copenhagen],[east_germany]:[east_berlin],[finland]:[helsinki],[poland]:[warsaw],[soviet_union]:[moscow],[sweden]:[stockholm],[west_germany]:[bonn]]]
  227.  
  228. % ---------------------------------------------------------------------------------------------------
  229.  
  230. % ---------------------------------------------------------------------------------------------------
  231.  
  232. %                       [what,are,the,capitals,of,the,countries,bordering,the,baltic,?]
  233.  
  234. % =========================================================================================================
  235.  
  236. % =========================================================================================================
  237.  
  238. %                       [which,countries,are,bordered,by,two,seas,?]
  239.  
  240. % ---------------------------------------------------------------------------------------------------
  241.  
  242. Sentence(report): 0sec.
  243. [w(which,open),w(countries,open),w(are,open),w(bordered,open),w(by,open),w(two,open),w(seas,open),w(?,open)]
  244.  
  245. POS Sentence(report): 0sec.
  246. [w(which,open),w(countries,open),w(are,open),w(bordered,open),w(by,open),w(two,open),w(seas,open),w(?,open)]
  247.  
  248. Parse: 0.13700000000000045sec.
  249. whq(A, s(np(3+pl, np_head(int_det(A), [], country), []), verb(BORDER, passive, pres+fin, [], POS(B), tv), [], [pp(prep(by), np(3+pl, np_head(quant(same, nb(2)), [], sea), []))])) :-
  250.         whq(A,
  251.             s(np(3+pl, np_head(int_det(A), [], country), []),
  252.               verb(BORDER, passive, pres+fin, [], POS(B), tv),
  253.               [],
  254.               [pp(prep(by), np(3+pl, np_head(quant(same, nb(2)), [], sea), []))])).
  255.  
  256. %       good_kyqdhq(np(3+pl,np_head(int_det(A),[],country),[]),np_head(int_det(A),[],country),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  257. %       good_kyqdhq(np(3+pl,np_head(int_det(A),[],country),[]),np_head(int_det(A),[],country),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  258. %        good_kyqdhq(np(3+pl,np_head(quant(same,nb(2)),[],sea),[]),np_head(quant(same,nb(2)),[],sea),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  259. % var_simplify((answer80([A]):- ((country(A),true),true),numberof(B, (((sea(B),true),true),true,borders(B,A),true,true),2)),C)
  260.  
  261. Semantics: 0.012999999999991019sec.
  262. answer80([B]) :-
  263.    country(B)
  264.  & 2 = numberof C
  265.      sea(C)
  266.    & borders(C,B)
  267.  
  268. Planning: 0.0sec.
  269. answer80([B]) :-
  270.    2 = numberof C
  271.      sea(C)
  272.    & borders(C,B)
  273.  & {country(B)}
  274.  
  275. Reply: 0.0sec.
  276. [egypt,iran,israel,saudi_arabia,turkey]
  277.  
  278. % ---------------------------------------------------------------------------------------------------
  279.  
  280. % ---------------------------------------------------------------------------------------------------
  281.  
  282. %                       [which,countries,are,bordered,by,two,seas,?]
  283.  
  284. % =========================================================================================================
  285.  
  286. % =========================================================================================================
  287.  
  288. %                       [how,many,countries,does,the,danube,flow,through,?]
  289.  
  290. % ---------------------------------------------------------------------------------------------------
  291.  
  292. Sentence(report): 0sec.
  293. [w(how,open),w(many,open),w(countries,open),w(does,open),w(the,open),w(danube,open),w(flow,open),w(through,open),w(?,open)]
  294.  
  295. POS Sentence(report): 0sec.
  296. [w(how,open),w(many,open),w(countries,open),w(does,open),w(the,open),w(danube,open),w(flow,open),w(through,open),w(?,open)]
  297.  
  298. Parse: 0.01099999999999568sec.
  299. whq(B, s(np(3+sg, nameOf(danube), []), verb(DO, active, pres+fin, [], POS(C), ditrans(A)), [arg(dir, A, np(3+sg, np_head(generic, [], flow), [pp(prep(through), np(3+pl, np_head(quant(same, wh(B)), [], country), []))]))], [])) :-
  300.         whq(B,
  301.             s(np(3+sg, nameOf(danube), []),
  302.               verb(DO, active, pres+fin, [], POS(C), ditrans(A)),
  303.  
  304.               [ arg(dir,
  305.                     A,
  306.                     np(3+sg,
  307.                        np_head(generic, [], flow),
  308.  
  309.                        [ pp(prep(through),
  310.                             np(3+pl,
  311.                                np_head(quant(same, wh(B)), [], country),
  312.                                []))
  313.                        ]))
  314.               ],
  315.               [])).
  316.  
  317. %       good_kyqdhq(np(3+sg,nameOf(danube),[]),nameOf(danube),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  318. %          good_kyqdhq(np(3+sg,nameOf(danube),[]),nameOf(danube),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  319. %          good_kyqdhq(np(3+sg,nameOf(danube),[]),nameOf(danube),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  320. %          good_kyqdhq(np(3+sg,nameOf(danube),[]),nameOf(danube),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  321. %             good_kyqdhq(np(3+sg,nameOf(danube),[]),nameOf(danube),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  322. %             good_kyqdhq(np(3+sg,nameOf(danube),[]),nameOf(danube),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  323. +(-(-(-(report,Failed after ),0.1280000000000001), TO understand: ),[=(sent,[how,many,countries,does,the,danube,flow,through,?]),=(parse,_G25002955),=(sem,error),=(qplan,error),=(answers,failed)])
  324.  
  325. % ---------------------------------------------------------------------------------------------------
  326.  
  327. %                       [how,many,countries,does,the,danube,flow,through,?]
  328.  
  329. % =========================================================================================================
  330.  
  331. % =========================================================================================================
  332.  
  333. %                       [what,is,the,total,area,of,countries,south,of,the,equator,AND,NOT,in,australasia,?]
  334.  
  335. % ---------------------------------------------------------------------------------------------------
  336.  
  337. Sentence(report): 0sec.
  338. [w(what,open),w(is,open),w(the,open),w(total,open),w(area,open),w(of,open),w(countries,open),w(south,open),w(of,open),w(the,open),w(equator,open),w(AND,open),w(NOT,open),w(in,open),w(australasia,open),w(?,open)]
  339.  
  340. POS Sentence(report): 0sec.
  341. [w(what,open),w(is,open),w(the,open),w(total,open),w(area,open),w(of,open),w(countries,open),w(south,open),w(of,open),w(the,open),w(equator,open),w(AND,open),w(NOT,open),w(in,open),w(australasia,open),w(?,open)]
  342.  
  343. Parse: 0.0049999999999954525sec.
  344. whq(A, s(np(3+sg, wh(A), []), verb(be, active, pres+fin, [], POS(D), be), [arg(dir, np(3+sg, np_head(det(the(sg)), [adj(total)], area), [pp(prep(of), np(3+pl, np_head(generic, [], country), [conj(AND, reduced_rel(B, s(np(3+pl, wh(B), []), verb(be, active, pres+fin, [], POS(E), be), [arg(pred, pp(prep(southof), np(3+sg, nameOf(equator), [])))], [])), reduced_rel(C, s(np(3+pl, wh(C), []), verb(be, active, pres+fin, [], neg(NOT), be), [arg(pred, pp(prep(in), np(3+sg, nameOf(australasia), [])))], [])))]))]))], [])) :-
  345.         whq(A,
  346.             s(np(3+sg, wh(A), []),
  347.               verb(be, active, pres+fin, [], POS(D), be),
  348.  
  349.               [ arg(dir,
  350.                     np(3+sg,
  351.                        np_head(det(the(sg)), [adj(total)], area),
  352.  
  353.                        [ pp(prep(of),
  354.                             np(3+pl,
  355.                                np_head(generic, [], country),
  356.  
  357.                                [ conj(AND,
  358.                                       reduced_rel(B,
  359.                                                   s(np(3+pl, wh(B), []),
  360.                                                     verb(be,
  361.                                                          active,
  362.                                                          pres+fin,
  363.                                                          [],
  364.                                                          POS(E),
  365.                                                          be),
  366.  
  367.                                                     [ arg(pred,
  368.                                                           pp(prep(southof),
  369.                                                              np(3+sg,
  370.                                                                 nameOf(equator),
  371.                                                                 [])))
  372.                                                     ],
  373.                                                     [])),
  374.                                       reduced_rel(C,
  375.                                                   s(np(3+pl, wh(C), []),
  376.                                                     verb(be,
  377.                                                          active,
  378.                                                          pres+fin,
  379.                                                          [],
  380.                                                          neg(NOT),
  381.                                                          be),
  382.  
  383.                                                     [ arg(pred,
  384.                                                           pp(prep(in),
  385.                                                              np(3+sg,
  386.                                                                 nameOf(australasia),
  387.                                                                 [])))
  388.                                                     ],
  389.                                                     [])))
  390.                                ]))
  391.                        ]))
  392.               ],
  393.               [])).
  394.  
  395. %       good_kyqdhq(np(3+sg,wh(A),[]),wh(A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  396. %        good_kyqdhq(np(3+sg,np_head(det(the(sg)),[adj(total)],area),[pp(prep(of),np(3+pl,np_head(generic,[],country),[conj(AND,reduced_rel(A,s(np(3+pl,wh(A),[]),verb(be,active,pres+fin,[],POS(B),be),[arg(pred,pp(prep(southof),np(3+sg,nameOf(equator),[])))],[])),reduced_rel(C,s(np(3+pl,wh(C),[]),verb(be,active,pres+fin,[],neg(NOT),be),[arg(pred,pp(prep(in),np(3+sg,nameOf(australasia),[])))],[])))]))]),np_head(det(the(sg)),[adj(total)],area),D,quant(E,F,G,H,I,D),E,F,G,H,I)
  397. %                 error_show_call_failure(restriction_LF(total,A,B,C))
  398. %           good_kyqdhq(np(3+pl,np_head(generic,[],country),[conj(AND,reduced_rel(A,s(np(3+pl,wh(A),[]),verb(be,active,pres+fin,[],POS(B),be),[arg(pred,pp(prep(southof),np(3+sg,nameOf(equator),[])))],[])),reduced_rel(C,s(np(3+pl,wh(C),[]),verb(be,active,pres+fin,[],neg(NOT),be),[arg(pred,pp(prep(in),np(3+sg,nameOf(australasia),[])))],[])))]),np_head(generic,[],country),D,quant(E,F,G,H,I,D),E,F,G,H,I)
  399. %                  good_kyqdhq(np(3+pl,wh(measure&area-A),[]),wh(measure&area-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  400. %                  good_kyqdhq(np(3+pl,wh(measure&area-A),[]),wh(measure&area-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  401. %                    good_kyqdhq(np(3+sg,nameOf(equator),[]),nameOf(equator),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  402. %                    good_kyqdhq(np(3+pl,wh(feature&place&country-A),[]),wh(feature&place&country-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  403. %                    good_kyqdhq(np(3+pl,wh(feature&place&country-A),[]),wh(feature&place&country-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  404. %  good_kyqdhq(np(3+sg,nameOf(equator),[]),nameOf(equator),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  405. %                    good_kyqdhq(np(3+pl,wh(feature&place&country-A),[]),wh(feature&place&country-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  406. %                    good_kyqdhq(np(3+pl,wh(feature&place&country-A),[]),wh(feature&place&country-A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  407. %  good_kyqdhq(np(3+sg,nameOf(australasia),[]),nameOf(australasia),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  408. % var_simplify((answer80([A]):-B^ ((C^ (setof(D:[E], (areaOf(E,D), (((country(E),true), ((((true,true),true), ((true,true),true),true, (true,true,southof(E,equator),true,true),true), ((true,true),true),true,\+ (((true,true),true),true,true,in(E,australasia),true,true),true),true),true),true,true,true),C),aggregate(total,C,B)),true), ((true,true),true),true,A=B,true,true)),F)
  409.  
  410. Semantics: 0.017000000000010118sec.
  411. answer80([B]) :-
  412.    exists C
  413.      C = setof D:[E]
  414.        areaOf(E,D)
  415.      & country(E)
  416.      & southof(E,equator)
  417.      & \+in(E,australasia)
  418.    & aggregate(total,C,B)
  419.  
  420. Reply: 0.000999999999990564sec.
  421. [--(10239,ksqmiles)]
  422.  
  423. % ---------------------------------------------------------------------------------------------------
  424.  
  425. % ---------------------------------------------------------------------------------------------------
  426.  
  427. %                       [what,is,the,total,area,of,countries,south,of,the,equator,AND,NOT,in,australasia,?]
  428.  
  429. % =========================================================================================================
  430.  
  431. % =========================================================================================================
  432.  
  433. %                       [what,is,the,average,area,of,the,countries,in,each,continent,?]
  434.  
  435. % ---------------------------------------------------------------------------------------------------
  436.  
  437. Sentence(report): 0sec.
  438. [w(what,open),w(is,open),w(the,open),w(average,open),w(area,open),w(of,open),w(the,open),w(countries,open),w(in,open),w(each,open),w(continent,open),w(?,open)]
  439.  
  440. POS Sentence(report): 0sec.
  441. [w(what,open),w(is,open),w(the,open),w(average,open),w(area,open),w(of,open),w(the,open),w(countries,open),w(in,open),w(each,open),w(continent,open),w(?,open)]
  442.  
  443. Parse: 0.0040000000000048885sec.
  444. whq(A, s(np(3+sg, wh(A), []), verb(be, active, pres+fin, [], POS(B), be), [arg(dir, np(3+sg, np_head(det(the(sg)), [adj(average)], area), [pp(prep(of), np(3+pl, np_head(det(the(pl)), [], country), [pp(prep(in), np(3+sg, np_head(det(each), [], continent), []))]))]))], [])) :-
  445.         whq(A,
  446.             s(np(3+sg, wh(A), []),
  447.               verb(be, active, pres+fin, [], POS(B), be),
  448.  
  449.               [ arg(dir,
  450.                     np(3+sg,
  451.                        np_head(det(the(sg)), [adj(average)], area),
  452.  
  453.                        [ pp(prep(of),
  454.                             np(3+pl,
  455.                                np_head(det(the(pl)), [], country),
  456.  
  457.                                [ pp(prep(in),
  458.                                     np(3+sg,
  459.                                        np_head(det(each), [], continent),
  460.                                        []))
  461.                                ]))
  462.                        ]))
  463.               ],
  464.               [])).
  465.  
  466. %       good_kyqdhq(np(3+sg,wh(A),[]),wh(A),B,quant(C,D,E,F,G,B),C,D,E,F,G)
  467. %        good_kyqdhq(np(3+sg,np_head(det(the(sg)),[adj(average)],area),[pp(prep(of),np(3+pl,np_head(det(the(pl)),[],country),[pp(prep(in),np(3+sg,np_head(det(each),[],continent),[]))]))]),np_head(det(the(sg)),[adj(average)],area),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  468. %                 error_show_call_failure(restriction_LF(average,A,B,C))
  469. %           good_kyqdhq(np(3+pl,np_head(det(the(pl)),[],country),[pp(prep(in),np(3+sg,np_head(det(each),[],continent),[]))]),np_head(det(the(pl)),[],country),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  470. %         good_kyqdhq(np(3+sg,np_head(det(each),[],continent),[]),np_head(det(each),[],continent),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  471. %            good_kyqdhq(np(3+sg,np_head(det(each),[],continent),[]),np_head(det(each),[],continent),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  472. %              good_kyqdhq(np(3+sg,np_head(det(each),[],continent),[]),np_head(det(each),[],continent),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  473. % var_simplify((answer80([A,B]):- ((continent(A),true),true),C^ ((D^ (setof(E:[F], (areaOf(F,E), (true, (country(F), (true,in(F,A)),true),true),true,true,true),D),aggregate(average,D,C)),true), ((true,true),true),true,B=C,true,true)),G)
  474.  
  475. Semantics: 0.0030000000000001137sec.
  476. answer80([B,C]) :-
  477.    continent(B)
  478.  & exists D
  479.      D = setof E:[F]
  480.        areaOf(F,E)
  481.      & country(F)
  482.      & in(F,B)
  483.    & aggregate(average,D,C)
  484.  
  485. Reply: 0.012000000000000455sec.
  486. [[europe,--(58.84375,ksqmiles)]]
  487.  
  488. % ---------------------------------------------------------------------------------------------------
  489.  
  490. % ---------------------------------------------------------------------------------------------------
  491.  
  492. %                       [what,is,the,average,area,of,the,countries,in,each,continent,?]
  493.  
  494. % =========================================================================================================
  495.  
  496. % =========================================================================================================
  497.  
  498. %                       [is,there,more,than,one,country,in,each,continent,?]
  499.  
  500. % ---------------------------------------------------------------------------------------------------
  501.  
  502. Sentence(report): 0sec.
  503. [w(is,open),w(there,open),w(more,open),w(than,open),w(one,open),w(country,open),w(in,open),w(each,open),w(continent,open),w(?,open)]
  504.  
  505. POS Sentence(report): 0sec.
  506. [w(is,open),w(there,open),w(more,open),w(than,open),w(one,open),w(country,open),w(in,open),w(each,open),w(continent,open),w(?,open)]
  507.  
  508. Parse: 0.0020000000000095497sec.
  509. q(s(there, verb(be, active, pres+fin, [], POS(A), be), [arg(dir, np(3+sg, np_head(quant(more, nb(1)), [], country), [pp(prep(in), np(3+sg, np_head(det(each), [], continent), []))]))], [])) :-
  510.         q(s(there,
  511.             verb(be, active, pres+fin, [], POS(A), be),
  512.  
  513.             [ arg(dir,
  514.                   np(3+sg,
  515.                      np_head(quant(more, nb(1)), [], country),
  516.  
  517.                      [ pp(prep(in),
  518.                           np(3+sg, np_head(det(each), [], continent), []))
  519.                      ]))
  520.             ],
  521.             [])).
  522.  
  523. %        good_kyqdhq(np(3+sg,np_head(quant(more,nb(1)),[],country),[pp(prep(in),np(3+sg,np_head(det(each),[],continent),[]))]),np_head(quant(more,nb(1)),[],country),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  524. %         good_kyqdhq(np(3+sg,np_head(det(each),[],continent),[]),np_head(det(each),[],continent),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  525. %           good_kyqdhq(np(3+sg,np_head(det(each),[],continent),[]),np_head(det(each),[],continent),A,quant(B,C,D,E,F,A),B,C,D,E,F)
  526. % var_simplify((answer80([]):- \+A^ (((continent(A),true),true),\+B^ (numberof(C, (((country(C), (true,in(C,A)),true),true),D^ (((true,true),true),true,D=C,true,true)),B),B>1))),E)
  527.  
  528. Semantics: 0.001999999999995339sec.
  529. answer80([]) :-
  530.    \+
  531.      exists B
  532.        continent(B)
  533.      & \+
  534.          exists C
  535.            C = numberof D
  536.              country(D)
  537.            & in(D,B)
  538.          & C>1
  539.  
  540. Reply: 0.0049999999999954525sec.
  541. [false]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement