From 10150a5d98c553366117f4e170cbf0dc2859d5ce Mon Sep 17 00:00:00 2001 From: high-moctane Date: Tue, 1 Oct 2019 18:21:29 +0900 Subject: [PATCH] wrote a simple usage. --- main.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/main.go b/main.go index 3b3cdb9..e9905da 100644 --- a/main.go +++ b/main.go @@ -22,7 +22,19 @@ func main() { func run() int { if !parseArgs() { + help := `The nextword prints the most likely English words that follow the stdin sentence. + +The space character at the end of line plays an important role. If the line ends +with a space, the command show the next suggested words. However, if the line +ends with an alphabetic character, the suggested words start with the last word +of the line. + +This command needs an external dataset. The dataset path should be set in an +environment value "$NEXTWORD_DATA_PATH". ` + flag.Usage() + fmt.Fprintln(os.Stderr, "") + fmt.Fprintln(os.Stderr, help) return 1 }