static L<Rect> ocr_groupRects(L<Rect> rects, S s) { L<S> l = ocr_parseGlyphs(dropSpaces(s)); assertEquals(l(rects), l(l)); new L<Rect> rects2; for (int i = 0; i < l(l); ) { int j = i+1; while (j < l(l) && eq(l.get(j), "_")) ++j; rects2.add(mergeRects(subList(rects, i, j))); i = j; } ret rects2; }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006128 |
Snippet name: | ocr_groupRects - group character rects according to interpretation |
Eternal ID of this version: | #1006128/2 |
Text MD5: | 866218f48c1abd1269090503f69ff472 |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-11-20 00:04:12 |
Source code size: | 336 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 492 / 512 |
Version history: | 1 change(s) |
Referenced in: | #1006129 - ocr_unmerge - see ocr_groupRects #1006654 - Standard functions list 2 (LIVE, continuation of #761) |