Uses 911K of libraries. Click here for Pure Java version (11889L/66K).
!7 cmodule IWantYouToBePrelude > DynPrintLog { transient Set<S> facts = tlft_ciSet([[ Computery is usery's assistant It is impossible that {Computery is usery's mother} ]]); transient MultiMap<S, WordTokRule> rulesForSpace = litmultimap( MultiSpaceReasoning1.userSpace, ll(wordTokReplacerRule( "I want you to be my assistant", "assistant", "I want that {you are my assistant}")), MultiSpaceReasoning1.objectiveSpace, ll(new WordTokRule("Usery wants that X", "X") { // { debug = true; } run { S x_simplified = simpleSpaces_nTok(getVar("X")); if (contains(facts, x_simplified)) emit("But " + x_simplified + " already"); else if (contains(facts, "It is impossible that " + curly(x_simplified))) emit("No way brother"); else if (debug) print("Can't decide on: " + x_simplified); } }) ); start-thread-printDone { new MultiSpaceReasoning1 mr; mr.addRules(rulesForSpace); for (S input : ll("I want you to be my mother", "I want you to be my assistant")) { print_nlBefore(input); Collection<ES> outputs = mr.reason_inputToAnswer(ll(ext(input))); pnlIndent("Bot space > ", outputs); } } }
Began life as a copy of #1023210
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1023211 | 
| Snippet name: | I want you to be... [prelude spike v4 shortened - triggers compiler bug in JDK 8?] | 
| Eternal ID of this version: | #1023211/4 | 
| Text MD5: | f4011c79317d296e0cac91b9aa11701e | 
| Transpilation MD5: | 9d3972836959ff05717c1f2b1621b842 | 
| Author: | stefan | 
| Category: | javax / a.i. | 
| Type: | JavaX source code (Dynamic Module) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2019-05-16 20:25:14 | 
| Source code size: | 1273 bytes / 36 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 527 / 801 | 
| Version history: | 3 change(s) | 
| Referenced in:- |