From fb77852acbdbbcedcdb9771770cb6771da002851 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 23 Jan 2019 21:54:09 +0000 Subject: Update line-conf-buckets to mostly use package functions too. Working now, but needs more consolidation to be worth it. --- parse/hocr/hocr.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'parse/hocr/hocr.go') 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 -- cgit v1.2.1-24-ge1ad