static Map getLearnedCharacters2() { new Matches m; new HashSet md5s; for (S s : scanLog_iterator(glyphTeachLog())) { s = afterSquareBracketStuff(s); Pair p = splitAroundColon_toPair(s); if (p == null) continue; S md5 = regexpFirstGroupIC("Image (" + md5Regexp() + ")", p.a); if (md5 == null) continue; md5s.add(md5); } //print("MD5s we're looking for: " + struct(md5s)); new HashMap md5ToImage; for (S md5, File f : screenClipFiles()) { if (!md5s.contains(md5)) continue with print("Skipping clip: " + md5); BWImage img = loadBWImage(f); md5ToImage.put(md5, img); for (BWImage cImg : horizontalAutoSplitToImages(img)) { S cMD5 = ocrMD5OfBWImage(cImg); md5ToImage.put(cMD5, cImg); } } int found = l(md5ToImage); print("Loaded phrase images: " + found + "/" + l(md5s)); ret md5ToImage; }