summaryrefslogtreecommitdiff
path: root/line-conf-buckets-tess/line-conf-buckets-tess.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-01-19 12:28:28 +0000
committerNick White <git@njw.name>2019-01-19 12:28:28 +0000
commitcbbe18136e7474b9a697d67a99e56eb680f65e23 (patch)
tree06fc002506fa2a1aa132cd9665ecc9d265308a5d /line-conf-buckets-tess/line-conf-buckets-tess.go
parent715462d68e7fe91550a721fcb9e8ed657c5535be (diff)
Add linebreaks after lines, and add TODO
Diffstat (limited to 'line-conf-buckets-tess/line-conf-buckets-tess.go')
-rw-r--r--line-conf-buckets-tess/line-conf-buckets-tess.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/line-conf-buckets-tess/line-conf-buckets-tess.go b/line-conf-buckets-tess/line-conf-buckets-tess.go
index 82d6083..3e33b58 100644
--- a/line-conf-buckets-tess/line-conf-buckets-tess.go
+++ b/line-conf-buckets-tess/line-conf-buckets-tess.go
@@ -5,6 +5,7 @@ package main
// see https://github.com/OCR-D/ocrd-train/issues/7 and https://github.com/OCR-D/ocrd-train/
//
// TODO: Simplify things into functions more; this works well, but is a bit of a rush job
+// TODO: Parse line name to zero pad line numbers, so they come out in the correct order
import (
"encoding/xml"
@@ -224,6 +225,7 @@ func main() {
}
}
line.text = strings.TrimRight(linetext, " ")
+ line.text += "\n"
line.hocrname = strings.Replace(filepath.Base(f), ".hocr", "", 1)
line.img = img.(*image.Gray).SubImage(image.Rect(coords[0], coords[1], coords[2], coords[3]))
lines = append(lines, line)