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

22
LINES

< > BotCompany Repo | #1008387 // Correct word spelling with levenAttract [WORKS]

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

Libraryless. Click here for Pure Java version (3675L/25K/80K).

1  
!7
2  
3  
static Map<S, Int> attractors = litorderedmap(
4  
  "caffeine", 3,
5  
  "coffee", 2,
6  
  "cube", 1,
7  
  "cubes", 1,
8  
  "hello", 1,
9  
  "some", 1,
10  
  "please", 1);
11  
12  
sS demoText = "Helo I'd like som caffien-free cofee pleas";
13  
14  
p {
15  
  consoleSetInput(demoText);
16  
  testAnswerFunction(demoText);
17  
  botSleep();
18  
}
19  
20  
sS answer(S s) {
21  
  ret levenAttract(attractors, s);
22  
}

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: #1008387
Snippet name: Correct word spelling with levenAttract [WORKS]
Eternal ID of this version: #1008387/8
Text MD5: 0e1ea581e8975f9f62fc0a30f4f566d3
Transpilation MD5: b7422234a02e67b497885ffc0347a154
Author: stefan
Category: javax / a.i.
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-01 16:08:07
Source code size: 371 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 585 / 675
Version history: 7 change(s)
Referenced in: [show references]