summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-01-22 17:51:00 +0000
committerNick White <git@njw.name>2020-01-22 17:51:00 +0000
commit96b552ef6c3f6b248a2f1bbc163f196a62e8b5c3 (patch)
tree1d8500268b7197c8fcd86e744451e92a4dddf3e6 /cmd
parent40f0de0d4b864fd3f9f9c79b928ac303109750ad (diff)
Make pagegraph use lines again
Diffstat (limited to 'cmd')
-rw-r--r--cmd/pagegraph/main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/pagegraph/main.go b/cmd/pagegraph/main.go
index a52d38c..b941a6d 100644
--- a/cmd/pagegraph/main.go
+++ b/cmd/pagegraph/main.go
@@ -23,16 +23,16 @@ func main() {
return
}
- wordconfs, err := hocr.GetWordConfs(flag.Arg(0))
+ linedetails, err := hocr.GetLineDetails(flag.Arg(0))
if err != nil {
log.Fatal(err)
}
var confs []*bookpipeline.Conf
- for n, wc := range wordconfs {
+ for n, wc := range linedetails {
c := bookpipeline.Conf{
- Conf: wc,
+ Conf: wc.Avgconf * 100,
//Path: "fakepath",
- Path: fmt.Sprintf("word_%d", n),
+ Path: fmt.Sprintf("line_%d", n),
}
confs = append(confs, &c)
}
@@ -50,7 +50,7 @@ func main() {
log.Fatalln("Error creating file", fn, err)
}
defer f.Close()
- err = bookpipeline.GraphOpts(cconfs, filepath.Base(flag.Arg(0)), "Word number", false, f)
+ err = bookpipeline.GraphOpts(cconfs, filepath.Base(flag.Arg(0)), "Line number", false, f)
if err != nil {
log.Fatalln("Error creating graph", err)
}