From 60a198f7ee5843a0f77b6dfb845c3b0413e83705 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 5 Sep 2019 22:20:35 +0100 Subject: Don't abort analysis if we encounter a hocr with no words, just skip it --- lib/hocr/hocr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/hocr') diff --git a/lib/hocr/hocr.go b/lib/hocr/hocr.go index dcd0494..052aa19 100644 --- a/lib/hocr/hocr.go +++ b/lib/hocr/hocr.go @@ -123,7 +123,7 @@ func GetAvgConf(hocrfn string) (float64, error) { } } if num == 0 { - return 0, errors.New("No words found") + return 0, nil } return total / num, nil } -- cgit v1.2.1-24-ge1ad