1 | static L<Rect> ocr_groupRects(L<Rect> rects, S s) { |
2 | L<S> l = ocr_parseGlyphs(dropSpaces(s)); |
3 | assertEquals(l(rects), l(l)); |
4 | new L<Rect> rects2; |
5 | for (int i = 0; i < l(l); ) { |
6 | int j = i+1; |
7 | while (j < l(l) && eq(l.get(j), "_")) ++j; |
8 | rects2.add(mergeRects(subList(rects, i, j))); |
9 | i = j; |
10 | } |
11 | ret rects2; |
12 | } |
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: | 491 / 512 |
Version history: | 1 change(s) |
Referenced in: | [show references] |