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

20
LINES

< > BotCompany Repo | #1001884 // Simple NL Bot Example

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

Libraryless. Click here for Pure Java version (1430L/10K/32K).

!752 // current standard translator

// main program

p {
  makeBot("NL Test Bot.");
}

// S = String, s is the question, you return the answer.

static S answer(S s) {
  // match is flexible in terms of case and punctuation
   
  if (match("hello", s)) 
    ret "Hello you too!"; // ret = return
    
  ret null; // unknown question
}

// That is all! Now get tinybrain.de/x30.jar and run your program :)

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001884
Snippet name: Simple NL Bot Example
Eternal ID of this version: #1001884/1
Text MD5: 26a7320b62e625098f9212b9518e63ed
Transpilation MD5: 03701b060cc920fccb2149008dcbb46c
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-12-02 18:33:03
Source code size: 424 bytes / 20 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 602 / 626
Referenced in: [show references]