Skip to content

Instantly share code, notes, and snippets.

@cored
Created August 22, 2012 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cored/3430574 to your computer and use it in GitHub Desktop.
Save cored/3430574 to your computer and use it in GitHub Desktop.
(in-ns 'word)
(clojure/refer 'clojure)
(def token-regex #"\w+")
(defn to-lower-case [token-string]
(.toLowerCase token-string))
(defn tokenize-str [input-string]
(map to-lower-case (re-seq token-regex input-string)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment