Libraryless. Click here for Pure Java version (2862L/18K).
// returns actual CNC static ItIt<LS> subtokenizationsOfAnyLength(LS tok) { int n = countTokens(tok); ret nestedIterator(countIterator_inclusive(1, n), length -> // how many tokens to get mapI(countIterator_inclusive(0, n-length), i -> // first token to get subList(tok, i*2, (i+length)*2+1))); }
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: | #1028084 |
| Snippet name: | subtokenizationsOfAnyLength (OK) |
| Eternal ID of this version: | #1028084/4 |
| Text MD5: | 01451105478db1fc79baac278ac2f94f |
| Transpilation MD5: | c4fbb474dbbd16e7e97be0f286c9bdbd |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-05-17 16:20:34 |
| Source code size: | 316 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 431 / 556 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |