Libraryless. Click here for Pure Java version (2723L/17K).
static ItIt<IntRange> wordIntRangesIterator(LS tok, O... _) { boolPar plusFull; int n = countTokens(tok); ret nestedIterator( countIterator_exclusive(0, n), from -> mapI( countIterator_inclusive(from+1, from == 0 && !plusFull ? n-1 : n), to -> IntRange(from, to))); }
Began life as a copy of #1026589
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: | #1026606 |
Snippet name: | wordIntRangesIterator - all word ranges as IntRange (without full by default) |
Eternal ID of this version: | #1026606/5 |
Text MD5: | 244f31d8690f9fdfdd3e0298f054a972 |
Transpilation MD5: | d5ae0de71cb4107d36d937ed8bf3d5be |
Author: | stefan |
Category: | javax / nlp |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-16 14:55:42 |
Source code size: | 298 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 221 / 324 |
Version history: | 4 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1026614 - wordIntRangesIterator_shortestFirst - all word ranges as IntRange (without full by default) |