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

16
LINES

< > BotCompany Repo | #1012574 // ai_findStuffInText

JavaX fragment (include)

static O ai_findStuffInText(S s, S text) {
  new Matches m;
  if "* words"
    if (isInteger(m.get(0))) {
      int n = parseInt(m.get(0));
      L<S> l = words(text);
      if (l(l) == n) ret l;
      L<S> l2 = ai_listWithoutOr(l);
      if (l(l2) == n) ret l2;
      l2 = ai_listWithoutAnd(l);
      if (l(l2) == n) ret l2;
      null;
    }
  
  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: #1012574
Snippet name: ai_findStuffInText
Eternal ID of this version: #1012574/1
Text MD5: 140728ffd081c168d315cc02b33205d7
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-07 13:55:20
Source code size: 371 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 298 / 342
Referenced in: [show references]