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