From f9af58889ebfe6942470b62149bb347ee312deb9 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Sat, 9 Nov 2013 01:09:46 +0000 Subject: [PATCH] More very minor fiddling. Help flag now works, and apostrophe t, d and m (e.g. can't, I'd, I'm) are now formatted to orthographical convention. --- src/milkwood_clj/analyse.clj | 5 ++++- src/milkwood_clj/core.clj | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/milkwood_clj/analyse.clj b/src/milkwood_clj/analyse.clj index 86664f6..cfbbf85 100644 --- a/src/milkwood_clj/analyse.clj +++ b/src/milkwood_clj/analyse.clj @@ -56,4 +56,7 @@ file: the path name of a file to read; depth: the depth of rules/length of window we're considering" [file depth] - (analyse-tokens nil nil (map (fn [string] (.toLowerCase string)) (re-seq #"\w+\'[st]|\w+|\p{Punct}" (slurp file))) depth)) + (analyse-tokens nil nil + (map + (fn [string] (.toLowerCase string)) + (re-seq #"\w+\'[stdm]|\w+|\p{Punct}" (slurp file))) depth)) diff --git a/src/milkwood_clj/core.clj b/src/milkwood_clj/core.clj index f7085da..0f997b8 100644 --- a/src/milkwood_clj/core.clj +++ b/src/milkwood_clj/core.clj @@ -20,7 +20,8 @@ ["-t" "--tuple-length" "The length of the sequences to analyse it into (integer)" :parse-fn #(Integer. %) - :default 2]) file (arguments :file)] + :default 2]) + file (arguments :file)] (cond (= file nil) (print banner) (arguments :help) (print banner) @@ -28,6 +29,6 @@ (synthesise/compose-nonsense (analyse/analyse-file file (arguments :tuple-length)) (arguments :output-length)))) - (prn "\n"))) + (flush)))