summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/confgraph/main.go8
-rw-r--r--cmd/pagegraph/main.go8
2 files changed, 14 insertions, 2 deletions
diff --git a/cmd/confgraph/main.go b/cmd/confgraph/main.go
index ed5ce93..3ee2f95 100644
--- a/cmd/confgraph/main.go
+++ b/cmd/confgraph/main.go
@@ -12,6 +12,12 @@ import (
"rescribe.xyz/utils/pkg/hocr"
)
+const usage = `Usage: confgraph hocrdir graph.png
+
+confgraph creates a graph showing average word confidence of each
+page of hOCR in a directory.
+`
+
func walker(confs *[]*bookpipeline.Conf) filepath.WalkFunc {
return func(path string, info os.FileInfo, err error) error {
if info.IsDir() {
@@ -38,7 +44,7 @@ func walker(confs *[]*bookpipeline.Conf) filepath.WalkFunc {
func main() {
flag.Usage = func() {
- fmt.Fprintln(flag.CommandLine.Output(), "Usage: confgraph hocrdir graph.png")
+ fmt.Fprintln(flag.CommandLine.Output(), usage)
flag.PrintDefaults()
}
flag.Parse()
diff --git a/cmd/pagegraph/main.go b/cmd/pagegraph/main.go
index a89c7a3..5b6b35f 100644
--- a/cmd/pagegraph/main.go
+++ b/cmd/pagegraph/main.go
@@ -11,10 +11,16 @@ import (
"rescribe.xyz/utils/pkg/hocr"
)
+const usage = `Usage: pagegraph [-l] file.hocr graph.png
+
+pagegraph creates a graph showing average confidence of each
+word in a page of hOCR.
+`
+
func main() {
lines := flag.Bool("l", false, "use line confidence instead of word confidence")
flag.Usage = func() {
- fmt.Fprintln(flag.CommandLine.Output(), "Usage: pagegraph [-l] file.hocr graph.png")
+ fmt.Fprintln(flag.CommandLine.Output(), usage)
flag.PrintDefaults()
}
flag.Parse()