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

14
LINES

< > BotCompany Repo | #1013435 // rule_everyWordContains

JavaX fragment (include)

1  
/*
2  
  if input (does every word contain an "e"?)
3  
  and      (X is a typical set of words)
4  
  and      (L = parseList(X))
5  
  then say (yesNo(containsIC(l, "e")))
6  
*/
7  
static S rule_everyWordContains() {
8  
  new Matches m;
9  
  ai_checkInput_match3("does every word contain an *?", m);
10  
  S c = $1;
11  
  S x = ai_text("$X", "is", "a typical set of words");
12  
  L<S> l = parseList(x);
13  
  ret yesNo(allContainIC(l, c));
14  
}

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: 349 / 380
Version history: 1 change(s)
Referenced in: [show references]