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:
parent
fffaf0cca0
commit
f9af58889e
|
@ -56,4 +56,7 @@
|
||||||
file: the path name of a file to read;
|
file: the path name of a file to read;
|
||||||
depth: the depth of rules/length of window we're considering"
|
depth: the depth of rules/length of window we're considering"
|
||||||
[file depth]
|
[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))
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
["-t" "--tuple-length"
|
["-t" "--tuple-length"
|
||||||
"The length of the sequences to analyse it into (integer)"
|
"The length of the sequences to analyse it into (integer)"
|
||||||
:parse-fn #(Integer. %)
|
:parse-fn #(Integer. %)
|
||||||
:default 2]) file (arguments :file)]
|
:default 2])
|
||||||
|
file (arguments :file)]
|
||||||
(cond
|
(cond
|
||||||
(= file nil) (print banner)
|
(= file nil) (print banner)
|
||||||
(arguments :help) (print banner)
|
(arguments :help) (print banner)
|
||||||
|
@ -28,6 +29,6 @@
|
||||||
(synthesise/compose-nonsense
|
(synthesise/compose-nonsense
|
||||||
(analyse/analyse-file file (arguments :tuple-length))
|
(analyse/analyse-file file (arguments :tuple-length))
|
||||||
(arguments :output-length))))
|
(arguments :output-length))))
|
||||||
(prn "\n")))
|
(flush)))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue