diff options
author | Nick White <git@njw.name> | 2021-03-23 11:14:35 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2021-03-23 11:14:35 +0000 |
commit | fa4f48ad54ec94c222269d335d40b21becff92a4 (patch) | |
tree | ca3ba1a4b46d1570607d9233455496e93e10517a /pkg/hocr/hocr.go | |
parent | 59d139893ab9044447e14fa091f50b48969847b5 (diff) |
hocr: Add ability to specify a custom image path for hocr line extraction, and use it in extracthocrlines
Diffstat (limited to 'pkg/hocr/hocr.go')
-rw-r--r-- | pkg/hocr/hocr.go | 10 |
1 files changed, 0 insertions, 10 deletions
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 |