我一直在嘗試實現https://github.com/herdrick/hierarchical-text/blob/master/src/hierarchical-classifier.clj,同時將*directory-string*
中的路徑更改爲包含文本文件的保存框。編譯器例外在REPL中發出,org.apache.commons.io.FileUtils/listFiles
給出java.lang.ClassNotFoundException
。實現Clojure庫
除了源代碼的鏈接我已經添加
(def clustered (cluster *txt-files*))
其中有下面的註釋後: 看到這棵樹可視化,請確保您有可視化/目錄。更改protovis-JSON文件在protovis.clj是完整路徑的可視化/ protovis-3.2/flare.js然後:
(def json (.replace (pof->js clustered 3) "/path/to/documents/" ""))
;;I have left the path to documents here for generality, the path is fully specified in my text editor
;;removing the dir path to each file keeps everything much cleaner.
(write-protovis-file json)
在clustered
的*txt-files*
包括
(def *txt-files* (seq (org.apache.commons.io.FileUtils/listFiles (new java.io.File *directory-string*) nil false)))
這是導致編譯器異常的部分。
我不知道如何擺脫org.apache的編譯器異常......此外,行「要看到這棵樹可視化,請確保你有visualize/dir。Change protovis-json-文件在protovis.clj是完整路徑到您的visualize/protovis-3.2/flare.js「和」刪除目錄路徑到每個文件讓一切更清潔「我不清楚。有人可以幫助闡明在這個實施中發生了什麼?