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).

!7

sclass Entry {
  S text, wordsTaken;
}

module ELESentencePrefixes > DynObjectTable<Entry> {
  start { doEvery(1.0, r grab); }
  
  void grab enter {
    if (!ele_on()) ret;
    LS tok = javaTokNPunctuationWithBrackets(ele_getInput());
    setList(mapI(countIterator_exclusive(1, countTokens(tok)+1),
      i -> nu Entry(text := getSentencePrefix(tok, i), 
        wordsTaken := i + "/" + countTokens(tok))));
  }
}

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: 204 / 369
Version history: 7 change(s)
Referenced in: [show references]