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

17
LINES

< > BotCompany Repo | #1026531 // ELE: Sentence Prefixes

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (18634L/134K).

1  
!7
2  
3  
sclass Entry {
4  
  S text, wordsTaken;
5  
}
6  
7  
module ELESentencePrefixes > DynObjectTable<Entry> {
8  
  start { doEvery(1.0, r grab); }
9  
  
10  
  void grab enter {
11  
    if (!ele_on()) ret;
12  
    LS tok = javaTokNPunctuationWithBrackets(ele_getInput());
13  
    setList(mapI(countIterator_exclusive(1, countTokens(tok)+1),
14  
      i -> nu Entry(text := getSentencePrefix(tok, i), 
15  
        wordsTaken := i + "/" + countTokens(tok))));
16  
  }
17  
}

Author comment

Began life as a copy of #1026505

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026531
Snippet name: ELE: Sentence Prefixes
Eternal ID of this version: #1026531/8
Text MD5: b34a77ac4c5cb47fe2a3a6e98297de88
Transpilation MD5: 60af40701ec911ab83b9103e61c97238
Author: stefan
Category: javax / electric logic engine
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-11 20:52:57
Source code size: 435 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 146 / 287
Version history: 7 change(s)
Referenced in: [show references]