get("#481") -- haikurecognize result = otherresults["#422"] or error("Need result of #422, please recalc") tbl = {} j = nil while true do i, j, x1, y1, x2, y2 = string.find(result, "(%d+),%s*(%d+),%s*(%d+),%s*(%d+)", j) if i == nil then break end x1, y1, x2, y2 = tonumber(x1), tonumber(y1), tonumber(x2), tonumber(y2) local cropped = {width=x2-x1, height=y2-y1, getInt = function(x, y) return img.getInt(x+x1, y+y1) end} local crop = string.sub(result, i, j) local s = haikurecognize(cropped) if s ~= "" then table.insert(tbl, crop..": "..s) end end return table.concat(tbl, "\n")