Created
June 6, 2010 02:04
-
-
Save herdrick/427187 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns hc (:use [incanter.core :only (abs sq sqrt)] | |
[incanter.stats :only (mean)] | |
[clojure.contrib.combinatorics :only (combinations)])) | |
(def *interesting-words-count* 3) | |
(def *directory-string* "/Users/herdrick/Dropbox/clojure/hierarchical-classifier/data/mixed") | |
(def *txt-files* (seq (org.apache.commons.io.FileUtils/listFiles (new java.io.File *directory-string*) nil true))) | |
(def file->seq (memoize (fn [file] | |
(re-seq #"[a-z]+" | |
(org.apache.commons.lang.StringUtils/lowerCase (slurp (.toString file))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment