!7 p-subst { autoRestart(); JNavigation nav = jnavigation(); frameIcon(#1101244, showFrame(nav)); for (final File f : listPNGFiles(javaxDataDir("Screen shots for text recognition"))) { print(f.getName()); final BufferedImage img = loadBufferedImage(f); print("Recognizing"); final L lines = ocr_recognizeMultiLine_scored(img); //lines = [S line : lines | l(getVar(line.text)) > 1]; //pnlStruct(lines); print("Got " + n2(lines, "line")); nav.addPage(f.getName(), func -> JComponent { final new ImageSurface is; showImageWithSelections(img, is, collect(lines, 'r)); onImageSurfaceHighlightChange(is, voidfunc(Rect r) { setToolTip(is, str(r)); }); ret jtabs( "Raw", jtextarea(pnlStructToString(lines)), "Picture", is); }); } }