Libraryless. Click here for Pure Java version (3899L/23K).
| 1 | svoid <A> deepDoubleWordIndex_add(DoubleWordIndex<WithIntArray<A>> wordIndex, A id, S text) {
 | 
| 2 | MultiMap<S, Int> positions = ciMultiMap(); | 
| 3 | for (IntRange r : wordIndex.wordRanges(text)) | 
| 4 | positions.put(substring(text, r), r.start); | 
| 5 | for (S word, L<Int> indices : positions.asMap()) | 
| 6 | wordIndex.addWord(new WithIntArray<A>(toIntArray(indices), id), word); | 
| 7 | } | 
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: | #1029013 | 
| Snippet name: | deepDoubleWordIndex_add | 
| Eternal ID of this version: | #1029013/2 | 
| Text MD5: | 6d6927ec01c055e3718c374c962b5d3a | 
| Transpilation MD5: | ce3d8e3319e4658b55dbfd653838f147 | 
| Author: | stefan | 
| Category: | javax | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2020-07-16 21:55:35 | 
| Source code size: | 368 bytes / 7 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 400 / 516 | 
| Version history: | 1 change(s) | 
| Referenced in: | [show references] |