diff --git a/src/hidden_markov_music/core.clj b/src/hidden_markov_music/core.clj index db719be..206f706 100644 --- a/src/hidden_markov_music/core.clj +++ b/src/hidden_markov_music/core.clj @@ -3,19 +3,20 @@ Currently no such interface exists." (:require [clojure.tools.cli :refer [parse-opts]] [clojure.string :as string] - [hidden-markov-music.util :as util] - [hidden-markov-music.alphabet :as alphabet] - [hidden-markov-music.model.core :as model] - [hidden-markov-music.demo.core :as demo]) + [hidden-markov-music.util :as util] + [hidden-markov-music.alphabet :as alphabet] + [hidden-markov-music.model.init :as init] + [hidden-markov-music.model.train :as train] + [hidden-markov-music.model.sample :as sample] + [hidden-markov-music.demo.core :as demo]) (:gen-class)) (def cli-arguments - {"alphabet" [alphabet/main - "Create an alphabet"] - "model" [model/main - "Perform an operation on a model"] - "demo" [demo/main - "Various demonstrations"]}) + {"alphabet" [alphabet/main "Create an alphabet"], + "init" [init/main "Initialize a model"], + "train" [train/main "Train a model"], + "sample" [sample/main "Sample from a model"], + "demo" [demo/main "Various demonstrations"]}) (def description "hidden-markov-music [] []") diff --git a/src/hidden_markov_music/model/core.clj b/src/hidden_markov_music/model/core.clj deleted file mode 100644 index a703e37..0000000 --- a/src/hidden_markov_music/model/core.clj +++ /dev/null @@ -1,25 +0,0 @@ -(ns hidden-markov-music.model.core - (:require [hidden-markov-music.hmm :as hmm] - [hidden-markov-music.model.init :as init] - [hidden-markov-music.model.train :as train] - [hidden-markov-music.model.sample :as sample] - [hidden-markov-music.util :as util] - [clojure.tools.cli :refer [parse-opts]] - [clojure.string :as string])) - -(def cli-arguments - {"init" [init/main - "Initialize a model"], - "train" [train/main - "Train a model"], - "sample" [sample/main - "Sample from a model"]}) - -(def description - "Usage: hidden-markov-music model [] []") - -(def main - (util/subcommand-parser description - util/cli-options-help - cli-arguments)) - diff --git a/src/hidden_markov_music/model/init.clj b/src/hidden_markov_music/model/init.clj index b40a47f..babf21b 100644 --- a/src/hidden_markov_music/model/init.clj +++ b/src/hidden_markov_music/model/init.clj @@ -11,7 +11,7 @@ "Mode may either be 'random' or 'uniform', and determines whether" "the probabilities are initialized randomly or uniformly." "" - "Usage: hidden-markov-music model init [] "] + "Usage: hidden-markov-music init [] "] (string/join \newline)))) (def cli-options diff --git a/src/hidden_markov_music/model/sample.clj b/src/hidden_markov_music/model/sample.clj index e0521ee..b4bb839 100644 --- a/src/hidden_markov_music/model/sample.clj +++ b/src/hidden_markov_music/model/sample.clj @@ -10,7 +10,7 @@ (->> ["Takes a model from standard input and writes a sample observation" "sequence to a file." "" - "Usage: hidden-markov-music model sample [] "] + "Usage: hidden-markov-music sample [] "] (string/join \newline)))) (def cli-options diff --git a/src/hidden_markov_music/model/train.clj b/src/hidden_markov_music/model/train.clj index 32afcca..1e39234 100644 --- a/src/hidden_markov_music/model/train.clj +++ b/src/hidden_markov_music/model/train.clj @@ -15,7 +15,7 @@ "appropriately, otherwise each line of the file is treated as an" "observation symbol." "" - "Usage: hidden-markov-music model train [] "] + "Usage: hidden-markov-music train [] "] (string/join \newline)))) (def cli-options