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

15
LINES

< > BotCompany Repo | #1012560 // ai_toPresentTense

JavaX fragment (include)

1  
static SS ai_toPresentTense_map = litcimap(
2  
  "was", "is",
3  
  "went", "go",
4  
  "had", "have",
5  
  "said", "say",
6  
  "did", "do");
7  
8  
static S ai_toPresentTense(S s) {
9  
  L<S> tok = defaultTok(s);
10  
  for (int i = 1; i < l(tok); i += 2) {
11  
    S x = ai_toPresentTense_map.get(tok.get(i));
12  
    if (x != null) tok.set(i, x);
13  
  }
14  
  ret join(tok);
15  
}

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: #1012560
Snippet name: ai_toPresentTense
Eternal ID of this version: #1012560/1
Text MD5: d5e41b2dab14d1c2a8c287bfe046c827
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-07 01:39:23
Source code size: 347 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 344 / 405
Referenced in: [show references]