!752 concepts. concept Example { BWImage image; S imageMD5; S text; // new fields in this program: BWImage visualizedSplit; bool countMatch; } concept Theory { new Ref fromExample; BWImage image; S imageMD5; S text; } p { loadConceptsFrom("#1006005"); Concepts in = mainConcepts; JTable table = showConceptsTable(Example); setFrameTitle(table, "Theories"); for (Example e : in.list(Example)) { L rects = horizontalAutoSplit2ThenAutoCrop(e.image); cset(e, visualizedSplit := new BWImage(mergeImagePartsHorizontally(e.image.toRGB(), rects))); S text = e.text.replace(" ", ""); cset(e, countMatch := l(rects) == l(text)); if (!e.countMatch) print("Bad number of characters: " + l(rects) + " vs " + l(text)); else { for i over rects: { BWImage cImg = e.image.clip(rects.get(i)); cnew(Theory, fromExample := e, image := cImg, imageMD5 := md5OfBWImage(cImg), text := substring(text, i, i+1)); } print("Made " + l(rects) + " theories"); } } }