sS ai_tryRuleWithDefaultFacts(S ruleID, S input) { Pair<L<IfThen>, LS> p = ai_activeRulesAndFacts(); L<IfThen> rules = filterByField(p.a, globalID := ruleID); if (empty(rules)) ret "Rule " + ruleID + " not found"; new NLLogicChecker_v3 c; c.facts = p.b; c.input = input; new L checkingLog; nlLogic_collectCheckingLog(c, checkingLog); applyNLLogicFacts_v4(c, null, rules); ret lines(checkingLog); }
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: | #1017926 |
Snippet name: | ai_tryRuleWithDefaultFacts |
Eternal ID of this version: | #1017926/1 |
Text MD5: | 7c09ba0c1ade6db1de7b587d0655babf |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-08-20 19:06:15 |
Source code size: | 428 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 386 / 408 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |