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

24
LINES

< > BotCompany Repo | #1010045 // Sentence to word chain [OK]

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

Download Jar. Uses 616K of libraries. Click here for Pure Java version (14311L/103K).

1  
!7
2  
3  
p {
4  
  preloadImage(CirclesAndLines.defaultBackgroundImageID = #1007402);
5  
  drawThoughtCircle_defaultColor = CirclesAndLines.defaultLineColor = Color.black;
6  
  botAndFocusConsole();
7  
  setConsoleInput("Hello world");
8  
}
9  
10  
answer {
11  
  L<S> tok = codeTokens(nlTok5(s));
12  
  if (nempty(tok)) {
13  
    Web web = simpleWeb();
14  
    WebNode n = null;
15  
    for (S t : tok) {
16  
      WebNode n2 = web.newNode(t);
17  
      if (n != null)
18  
        web_arrow(n, "next word", n2);
19  
      n = n2;
20  
    }
21  
    showWeb(web);
22  
    ret "Yo yo yo";
23  
  }
24  
}

Author comment

Began life as a copy of #1010042

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: #1010045
Snippet name: Sentence to word chain [OK]
Eternal ID of this version: #1010045/9
Text MD5: 357e9a643c4afa21089ce1ddd894c618
Transpilation MD5: 01afe7a6c12dad616d449bba5d3d25af
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-01 17:55:44
Source code size: 539 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 319 / 803
Version history: 8 change(s)
Referenced in: [show references]