Libraryless. Click here for Pure Java version (2723L/17K).
1 | static ItIt<IntRange> wordIntRangesIterator(LS tok, O... _) { |
2 | boolPar plusFull; |
3 | int n = countTokens(tok); |
4 | ret nestedIterator( |
5 | countIterator_exclusive(0, n), from -> mapI( |
6 | countIterator_inclusive(from+1, from == 0 && !plusFull ? n-1 : n), to -> |
7 | IntRange(from, to))); |
8 | } |
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: | 220 / 324 |
Version history: | 4 change(s) |
Referenced in: | [show references] |