diff options
author | Nick White <git@njw.name> | 2019-09-05 22:20:35 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-09-05 22:20:35 +0100 |
commit | 60a198f7ee5843a0f77b6dfb845c3b0413e83705 (patch) | |
tree | 5463522ac03b512ffe0f6e7c111cb904a4f5e3a4 /lib/hocr | |
parent | 7c897a13ad90bdcaffccf74d43cc4fd20f150226 (diff) |
Don't abort analysis if we encounter a hocr with no words, just skip it
Diffstat (limited to 'lib/hocr')
-rw-r--r-- | lib/hocr/hocr.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |