1 | static void ai_spec_answerYesNoTriple(S s) { |
2 | T3<S> t = ai_parseTriple(s); |
3 | ret unless t != null && endsWith(t.b, "?"); |
4 | S rel = dropLastTrim(t.b); |
5 | if (ai_hasTriple(t.a, rel, t.c)) { |
6 | ai_postTriple("Yes", "answers triple", s); |
7 | ret; |
8 | } |
9 | |
10 | S neg = ai_text("$X", "is negated relation of", rel); |
11 | if (ai_hasTriple(t.a, neg, t.c)) { |
12 | ai_postTriple("No", "answers triple", s); |
13 | ret; |
14 | } |
15 | } |
Began life as a copy of #1011862
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1012029 |
Snippet name: | ai_spec_answerYesNoTriple |
Eternal ID of this version: | #1012029/2 |
Text MD5: | c528fafb533ae2bf763dd5e00e16edb2 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-16 07:44:29 |
Source code size: | 422 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 433 / 501 |
Version history: | 1 change(s) |
Referenced in: | [show references] |