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.
This commit is contained in:
Simon Brooke 2013-11-09 01:09:46 +00:00
parent fffaf0cca0
commit f9af58889e
2 changed files with 7 additions and 3 deletions

View file

@ -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))

View file

@ -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)))