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

14
LINES

< > BotCompany Repo | #1012202 // ai_makePartQuestion

JavaX fragment (include)

static S ai_makePartQuestion(S chatName, S id) {
  if (empty(id)) null;
  for (S aThing : ai_texts_verified(id, "is", "$X")) {
    L<S> parts = ai_partsOf(aThing);
    for (S part : unnull(parts)) {
      S thePart = ai_spec_allWords(part + " of " + id);
      if (ai_text(thePart, "is", "$X") != null) continue;
      S q = "What is its " + drop_a_an_the(part) + "?";
      post("Open question in " + chatName, "is", thePart);
      ret q;
    }
  }
  null;
}

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: #1012202
Snippet name: ai_makePartQuestion
Eternal ID of this version: #1012202/5
Text MD5: 3eb5e3c0147da06f06b84c0b8ecf5841
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-23 20:19:54
Source code size: 473 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 395 / 411
Version history: 4 change(s)
Referenced in: [show references]