Download Jar. Libraryless. Click here for Pure Java version (7556L/54K).
1 | !7 |
2 | |
3 | p-exp { |
4 | new NLLogicChecker_v2 c; |
5 | c.matcher = new NLStringMatcher_dollarVars; |
6 | c.facts.add("the opposite of dark is bright"); |
7 | c.input = "what is the opposite of dark"; |
8 | |
9 | NLLogicChecker_v2.Matching m = new NLLogicChecker_v2.Matching(); |
10 | print("checks out", c.checkRule(nlLogic_parseRule([[ |
11 | input(What is the opposite of $old?) |
12 | && fact(The opposite of $old is $new) |
13 | => output(The opposite of $old is $new) |
14 | ]]), m)); |
15 | printStruct(m.matches); |
16 | pnlStruct(m.output); |
17 | } |
Began life as a copy of #1017581
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017588 |
Snippet name: | Test NLLogicChecker_v2 with vars (OK) |
Eternal ID of this version: | #1017588/6 |
Text MD5: | e064b9700aea2602606de4e0e4b2eba1 |
Transpilation MD5: | 3e469d6064fc5f96b49738d13c5ba3f5 |
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-07-28 12:20:50 |
Source code size: | 508 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 394 / 1005 |
Version history: | 5 change(s) |
Referenced in: | [show references] |