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

15
LINES

< > BotCompany Repo | #1012794 // ai_spec_whatIsXInY (or "of")

JavaX fragment (include)

1  
static void ai_spec_whatIsXInY(S s) {
2  
  new Matches m;
3  
  if (!flexMatchIC("What is * (in|of) *", unquote(s), m)) ret;
4  
  S elem = m.get(0), thing = m.get(2);
5  
  
6  
  // trigger required speculations
7  
  
8  
  post(s, "possibly related to:", elem);
9  
  post(s, "possibly related to:", thing);
10  
  ai_triggerSpeculationOn(thing);
11  
  
12  
  // harvest answers
13  
  for (S text : takeFirst(ai_spec_maxAnswersToReturn(), ai_texts("$X", "is " + elem + " in", thing)))
14  
    post(quote(text), "answers", s);
15  
} 

Author comment

Began life as a copy of #1012791

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: #1012794
Snippet name: ai_spec_whatIsXInY (or "of")
Eternal ID of this version: #1012794/9
Text MD5: 1c862889f4d373686e169c39ddfce3e3
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-13 18:55:54
Source code size: 494 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 446 / 454
Version history: 8 change(s)
Referenced in: [show references]