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

18
LINES

< > BotCompany Repo | #1010924 // ai_categoriesForChatLine

JavaX fragment (include)

static L<S> ai_categoriesForChatLine(S s) {
  new LinkedHashSet<S> l;
  if (matchStart("hello", s)) {
    l.add("greeting");
    if "hello robot|hello bot" l.add("greeting to robot");
  }
  if (matchStart("yes", s) || matchStart("no", s))
    l.add("yes/no answer");
  if (ai_isYesNoQuestion_1(s))
    l.add("yes/no question");
  else if (ai_isQuestion_1(s))
    l.add("question");
  if (matchStart("OK", s))
    l.add("ok line");
  if (startsWith(s, "!"))
    l.add("bot command");
  ret asList(l);
}

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: #1010924
Snippet name: ai_categoriesForChatLine
Eternal ID of this version: #1010924/6
Text MD5: a74df676123e672f0d43563b90b37f86
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-11 00:17:05
Source code size: 518 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 329 / 374
Version history: 5 change(s)
Referenced in: [show references]