Skip to content

Commit

Permalink
update to clojure 1.4 with new :require, make lein2 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrone committed Apr 17, 2012
1 parent 0cbcb18 commit a1b527c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
8 changes: 4 additions & 4 deletions project.clj
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,8 @@
(defproject cld "0.1.1-SNAPSHOT" (defproject cld "0.1.1-SNAPSHOT"
:description "Clojure Language Detection" :description "Clojure Language Detection"
:dependencies [[org.clojure/clojure "1.3.0"] :url "https://github.com/dakrone/cld"
:dependencies [[org.clojure/clojure "1.4.0"]
[org.clojars.thnetos/langdetect-lib "1.1"]] [org.clojars.thnetos/langdetect-lib "1.1"]]
:dev-dependencies [[criterium "0.2.1-SNAPSHOT"]] :profiles {:dev {:dependencies [[criterium "0.2.1-SNAPSHOT"]]}}
:resources-path "resources" :resource-paths ["resources"]
:dev-resources-path "resources"
:warn-on-reflection false) :warn-on-reflection false)
2 changes: 1 addition & 1 deletion src/cld/core.clj
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
(ns cld.core (ns cld.core
(:use [clojure.java.io :only [resource file]]) (:require [clojure.java.io :refer [resource file]])
(:import (com.cybozu.labs.langdetect Detector DetectorFactory) (:import (com.cybozu.labs.langdetect Detector DetectorFactory)
(java.util HashMap))) (java.util HashMap)))


Expand Down
10 changes: 5 additions & 5 deletions test/cld/test/benchmarks.clj
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns cld.test.benchmarks (ns cld.test.benchmarks
(:use [cld.core] (:require [cld.core :refer :all]
[clojure.test]) [clojure.test :refer :all]
(require [criterium.core :as bench])) [criterium.core :as bench]))


(default-init!) (default-init!)


Expand All @@ -24,11 +24,11 @@ With these additional ideas, we will have seen most of the basic technology that
(deftest t-benchmarks (deftest t-benchmarks
(println "Benchmarks with large text," (count text) "chars.") (println "Benchmarks with large text," (count text) "chars.")
(bench/with-progress-reporting (bench/with-progress-reporting
(bench/bench (detect text) :verbose))) (bench/quick-bench (detect text) :verbose)))


(def text2 "This is a sentence, it is written in English. I like tacos. My cat is weird.") (def text2 "This is a sentence, it is written in English. I like tacos. My cat is weird.")


(deftest t-benchmarks2 (deftest t-benchmarks2
(println "Benchmarks with small text," (count text2) "chars.") (println "Benchmarks with small text," (count text2) "chars.")
(bench/with-progress-reporting (bench/with-progress-reporting
(bench/bench (detect text2) :verbose))) (bench/quick-bench (detect text2) :verbose)))
5 changes: 2 additions & 3 deletions test/cld/test/core.clj
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns cld.test.core (ns cld.test.core
(:use [cld.core] (:require [cld.core :refer :all]
[clojure.test])) [clojure.test :refer :all]))


(default-init!) (default-init!)


Expand All @@ -27,4 +27,3 @@
"reforma laboral aprobada por el Ejecutivo es ya " "reforma laboral aprobada por el Ejecutivo es ya "
"el campo de batalla en el que se librará " "el campo de batalla en el que se librará "
"el enfrentamiento.")))))) "el enfrentamiento."))))))

0 comments on commit a1b527c

Please sign in to comment.