diff --git a/cmd/ir-tfidf/main.go b/cmd/ir-tfidf/main.go index 4d1958e..fa9dde3 100644 --- a/cmd/ir-tfidf/main.go +++ b/cmd/ir-tfidf/main.go @@ -11,6 +11,11 @@ import ( ) func main() { + if len(os.Args) < 2 { + fmt.Printf("You need to specify a keyword to search.\n") + os.Exit(1) + } + articles := artifact.Read("data/articles.json") tokens := make(map[string][]string)