From 08b0514908ad80543d11b910df2d931838699a42 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 8 Nov 2013 11:19:30 +0000 Subject: [PATCH] And for extra credit, deal with the special case of apostrophes, which the Java version did not handle! --- src/milkwood_clj/analyse.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/milkwood_clj/analyse.clj b/src/milkwood_clj/analyse.clj index d12c09b..502518d 100644 --- a/src/milkwood_clj/analyse.clj +++ b/src/milkwood_clj/analyse.clj @@ -58,4 +58,4 @@ 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+|\p{Punct}" (slurp file))) depth)) + (analyse-tokens nil nil (map (fn [string] (.toLowerCase string)) (re-seq #"\w+\'s|\w+|\p{Punct}" (slurp file))) depth))