From fa4f48ad54ec94c222269d335d40b21becff92a4 Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 23 Mar 2021 11:14:35 +0000 Subject: hocr: Add ability to specify a custom image path for hocr line extraction, and use it in extracthocrlines --- pkg/hocr/hocr.go | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'pkg/hocr/hocr.go') diff --git a/pkg/hocr/hocr.go b/pkg/hocr/hocr.go index 6cd1df1..e84c2b1 100644 --- a/pkg/hocr/hocr.go +++ b/pkg/hocr/hocr.go @@ -58,16 +58,6 @@ func wordConf(s string) (float64, error) { return strconv.ParseFloat(conf[1], 64) } -// Returns the image path for a page from a ocr_page title -func imagePath(s string) (string, error) { - re, err := regexp.Compile(`image ["']([^"']+)["']`) - if err != nil { - return "", err - } - m := re.FindStringSubmatch(s) - return m[1], nil -} - // BoxCoords parses bbox coordinate strings func BoxCoords(s string) ([4]int, error) { var coords [4]int -- cgit v1.2.1-24-ge1ad