static Map<S, BWImage> getLearnedCharacters2() { Concepts in = new Concepts("#1006104").safeLoad(); L<S> lines = (L) cget(first(list(in, "RecogInfo")), "lines"); new HashSet<S> md5s; new Matches m; for (S s : lines) if (matchStart("the images *", s, m)) md5s.addAll(splitAtSpace($1)); //print("MD5s we're looking for: " + struct(md5s)); Concepts in2 = new Concepts("#1005951").load(); new HashMap<S, BWImage> md5ToImage; for (GrabbedImage gi : list(in2, GrabbedImage)) { if (md5s.contains(gi.md5)) md5ToImage.put(gi.md5, gi.image); for (BWImage cImg : horizontalAutoSplitToImages(gi.image)) { S md5 = md5OfBWImage(cImg); if (md5s.contains(md5)) md5ToImage.put(md5, cImg); } } int found = 0; for (S md5 : md5s) { BWImage img = md5ToImage.get(md5); if (img != null) ++found; } //print("Found: " + found + "/" + l(md5s)); ret md5ToImage; }
Began life as a copy of #1006193
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015230 |
Snippet name: | getLearnedCharacters2 - OLD |
Eternal ID of this version: | #1015230/1 |
Text MD5: | 2fe0e367f98c45463512e49b8cc1fc66 |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-10 21:50:39 |
Source code size: | 957 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 370 / 387 |
Referenced in: | -