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

29
LINES

< > BotCompany Repo | #1010396 // User input to diagram v1 [OK]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (14844L/106K).

1  
!7
2  
3  
p {
4  
  bot();
5  
}
6  
7  
answer {
8  
  if (flexMatch("i'm *", s, m)) {
9  
    showWeb(webFromTriples(
10  
      "I", "am", $1
11  
    ));
12  
    ret "OK";
13  
  }
14  
  L<S> tok = nlTok5(s);
15  
  int i = indexOfVerb(tok);
16  
  if (i >= 0) {
17  
    if (i == 1)
18  
      showWeb(webFromTriples(
19  
        tok.get(i),
20  
        "",
21  
        trimJoinSubList(tok, i+1)));
22  
    else
23  
      showWeb(webFromTriples(
24  
        trimJoinSubList(tok, 0, i),
25  
        tok.get(i),
26  
        trimJoinSubList(tok, i+1)));
27  
    ret "OK";
28  
  }
29  
}

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: #1010396
Snippet name: User input to diagram v1 [OK]
Eternal ID of this version: #1010396/5
Text MD5: 8d9eadab761dc3f6273b80a247cc5942
Transpilation MD5: 1dc433f7c72d83bba47c1746f1f30212
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-15 18:48:34
Source code size: 499 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 646 / 1243
Version history: 4 change(s)
Referenced in: [show references]