Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1013059 // ai_matrixGet

JavaX fragment (include)

1  
static S ai_matrixGet(S topic, S category) {
2  
  new LinkedHashSet<S> v;
3  
  new LinkedHashSet<S> u;
4  
  if (has_verified(topic, "is", category)) v.add("yes");
5  
  if (has_verified(topic, "is not", category)) v.add("no");
6  
  if (has(topic, "is", category)) u.add("yes");
7  
  if (has(topic, "is not", category)) u.add("no");
8  
  
9  
  v.addAll(ai_matrixUnpack(ai_texts_verified(topic, "$X", category)));
10  
  u.addAll(ai_matrixUnpack(ai_texts(topic, "$X", category)));
11  
  
12  
  u.removeAll(v);
13  
  new L<S> l;
14  
  if (nempty(v)) l.add(joinWithComma(v));
15  
  if (nempty(u)) l.add("unverified: " + joinWithComma(u));
16  
  ret join(". ", l);
17  
}

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: #1013059
Snippet name: ai_matrixGet
Eternal ID of this version: #1013059/4
Text MD5: 7606c36e62b890147d5d3d3d5a2b8bb1
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-24 19:45:48
Source code size: 623 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 480 / 479
Version history: 3 change(s)
Referenced in: [show references]