summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-01-24 18:36:57 +0000
committerNick White <git@njw.name>2019-01-24 18:36:57 +0000
commit8dff3248515a81386c4bdedca9fa05b22033c68d (patch)
tree82f78a60e2c0452ca5aa016ae4001cc8dba205c7
parent729822830b60a34997d4ab6f9ad401dce454de50 (diff)
Export hocr Parse() function as its likely to be useful elsewhere
-rw-r--r--parse/hocr/hocr.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse/hocr/hocr.go b/parse/hocr/hocr.go
index 3599bef..81250a9 100644
--- a/parse/hocr/hocr.go
+++ b/parse/hocr/hocr.go
@@ -80,7 +80,7 @@ func noText(s string) bool {
return len(t) == 0
}
-func parseIt(b []byte) (Hocr, error) {
+func Parse(b []byte) (Hocr, error) {
var hocr Hocr
err := xml.Unmarshal(b, &hocr)
@@ -160,7 +160,7 @@ func GetLineDetails(hocrfn string) (parse.LineDetails, error) {
return newlines, err
}
- h, err := parseIt(file)
+ h, err := Parse(file)
if err != nil {
return newlines, err
}