summaryrefslogtreecommitdiff
path: root/bookpipeline/cmd
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-09-05 22:20:35 +0100
committerNick White <git@njw.name>2019-09-05 22:20:35 +0100
commit60a198f7ee5843a0f77b6dfb845c3b0413e83705 (patch)
tree5463522ac03b512ffe0f6e7c111cb904a4f5e3a4 /bookpipeline/cmd
parent7c897a13ad90bdcaffccf74d43cc4fd20f150226 (diff)
Don't abort analysis if we encounter a hocr with no words, just skip it
Diffstat (limited to 'bookpipeline/cmd')
-rw-r--r--bookpipeline/cmd/bookpipeline/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/bookpipeline/cmd/bookpipeline/main.go b/bookpipeline/cmd/bookpipeline/main.go
index 520311b..97f4109 100644
--- a/bookpipeline/cmd/bookpipeline/main.go
+++ b/bookpipeline/cmd/bookpipeline/main.go
@@ -156,6 +156,9 @@ func analyse(toanalyse chan string, up chan string, errc chan error, logger *log
errc <- errors.New(fmt.Sprintf("Error retreiving confidence for %s: %s", path, err))
return
}
+ if avg == 0 {
+ continue
+ }
base := filepath.Base(path)
codestart := strings.Index(base, "_bin")
name := base[0:codestart]