scope nlLogic_unresolvedFactsToQuestions. sbool #debug; static Collection<S> nlLogic_unresolvedFactsToQuestions(RuleFailInfo ruleFail) { if (ruleFail == null) ret emptyList(); Exp e = nlLogic_applyMatches(nlLogic_firstCondition(ruleFail.remainingConditions), ruleFail.matches); // Now have: fact(bla) in e if (e cast Func) if (eq(e.name, 'fact)) { S fact = "Unresolved fact: " + e.arg.text(); if (debug) print(fact); Pair<L<IfThen>, LS> p = ai_activeRulesAndFacts(ll(fact)); ret ai_deriveOutput(p.a, p.b); } ret emptyList(); } static Collection<S> nlLogic_unresolvedFactsToQuestions(Collection<RuleFailInfo> ruleFails) { new LinkedHashSet<S> out; for (RuleFailInfo fail : ruleFails) addAll(out, nlLogic_unresolvedFactsToQuestions(fail)); ret out; } end scope
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: | #1018081 |
| Snippet name: | nlLogic_unresolvedFactsToQuestions |
| Eternal ID of this version: | #1018081/5 |
| Text MD5: | 968e1fd54d5c27c1c6577472543a866b |
| 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-29 16:21:00 |
| Source code size: | 849 bytes / 28 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 565 / 584 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |