Download Jar. Libraryless. Click here for Pure Java version (9487L/52K).
!7 p-exp { BakedBot bot = bakedBotWithRulesAndFacts([[ [id: hbmitwbnclzyxxgu] anyInput() && $x, $y in eval(listToOverlappingPairs(words(ai_input()))) => fact($_q_x and $_q_y are words next to each other) [id: bvkghqiwkxgkpmda] fact($_q_x and $_q_y are words next to each other) && fact($_q_x is a noun) && fact($_q_y is a noun) => fact[javaTokNoQuotes]("$x $y" is a noun) ]], [[ "donald" is a noun "duck" is a noun ]]); setOpt(bot.factsBot(), useIterate := true); bot.imagineMode(); bot.answer("hi donald duck yo"); bot.answer("!imaginaryFacts"); assertTrueVerbose(matchAny([["donald duck" is a noun]], print(bot.imaginedFacts()))); }
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: | 460 / 1080 |
Version history: | 9 change(s) |
Referenced in: | [show references] |