And for extra credit, deal with the special case of apostrophes, which
the Java version did not handle!
This commit is contained in:
parent
3315eef7b8
commit
08b0514908
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue