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

14
LINES

< > BotCompany Repo | #1013435 // rule_everyWordContains

JavaX fragment (include)

/*
  if input (does every word contain an "e"?)
  and      (X is a typical set of words)
  and      (L = parseList(X))
  then say (yesNo(containsIC(l, "e")))
*/
static S rule_everyWordContains() {
  new Matches m;
  ai_checkInput_match3("does every word contain an *?", m);
  S c = $1;
  S x = ai_text("$X", "is", "a typical set of words");
  L<S> l = parseList(x);
  ret yesNo(allContainIC(l, c));
}

Author comment

Began life as a copy of #1013414

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: #1013435
Snippet name: rule_everyWordContains
Eternal ID of this version: #1013435/2
Text MD5: f97714acc7c8379691e79ada3814867d
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-06 10:40:21
Source code size: 413 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 420 / 450
Version history: 1 change(s)
Referenced in: [show references]