Download Jar. Libraryless. Click here for Pure Java version (9487L/52K).
1 | !7 |
2 | |
3 | p-exp { |
4 | BakedBot bot = bakedBotWithRulesAndFacts([[ |
5 | [id: hbmitwbnclzyxxgu] anyInput() && $x, $y in eval(listToOverlappingPairs(words(ai_input()))) |
6 | => fact($_q_x and $_q_y are words next to each other) |
7 | |
8 | [id: bvkghqiwkxgkpmda] fact($_q_x and $_q_y are words next to each other) |
9 | && fact($_q_x is a noun) |
10 | && fact($_q_y is a noun) |
11 | => fact[javaTokNoQuotes]("$x $y" is a noun) |
12 | ]], [[ |
13 | "donald" is a noun |
14 | "duck" is a noun |
15 | ]]); |
16 | |
17 | setOpt(bot.factsBot(), useIterate := true); |
18 | bot.imagineMode(); |
19 | |
20 | bot.answer("hi donald duck yo"); |
21 | bot.answer("!imaginaryFacts"); |
22 | assertTrueVerbose(matchAny([["donald duck" is a noun]], print(bot.imaginedFacts()))); |
23 | } |
Began life as a copy of #1018220
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018221 |
Snippet name: | Facts from input v2 [OK] |
Eternal ID of this version: | #1018221/10 |
Text MD5: | ab78abf46196ebc47b967a24142c0665 |
Transpilation MD5: | d58497878a458e8215d12c3ddec617c4 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-09-10 19:40:06 |
Source code size: | 724 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 461 / 1083 |
Version history: | 9 change(s) |
Referenced in: | [show references] |