diff options
author | Nick White <git@njw.name> | 2019-01-23 21:54:09 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-01-23 21:54:15 +0000 |
commit | fb77852acbdbbcedcdb9771770cb6771da002851 (patch) | |
tree | 233b6cedea313702c994919906d156d829ed378e /parse/hocr | |
parent | d256f967a26ceeb7c3987a1fc447b126a35054f9 (diff) |
Update line-conf-buckets to mostly use package functions too.
Working now, but needs more consolidation to be worth it.
Diffstat (limited to 'parse/hocr')
-rw-r--r-- | parse/hocr/hocr.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/parse/hocr/hocr.go b/parse/hocr/hocr.go index a281a7a..f7cac05 100644 --- a/parse/hocr/hocr.go +++ b/parse/hocr/hocr.go @@ -1,7 +1,8 @@ package hocr // TODO: consider making GetLineDetails() a function of Hocr, so could do a -// similar thing with prob format files too. +// similar thing with prob format files too, and then fire them both +// off a generic interface, potentially. // TODO: Parse line name to zero pad line numbers, so they come out in the correct order import ( @@ -137,7 +138,7 @@ func GetLineDetails(h Hocr, i image.Image, name string) (parse.LineDetails, erro } line.Text = strings.TrimRight(linetext, " ") line.Text += "\n" - line.Hocrname = name + line.OcrName = name var imgd parse.ImgDirect imgd.Img = i.(*image.Gray).SubImage(image.Rect(coords[0], coords[1], coords[2], coords[3])) line.Img = imgd |