Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

whitespace cleanup

  • Loading branch information...
commit 1bdb8b420039bc1095198f3f2946f4e6499f1272 1 parent 16958cc
@dakrone authored
Showing with 13 additions and 11 deletions.
  1. +3 −3 test/opennlp/test/nlp.clj
  2. +10 −8 test/opennlp/test/tools/train.clj
View
6 test/opennlp/test/nlp.clj
@@ -71,7 +71,8 @@
(is (thrown? java.lang.AssertionError (name-find "asdf"))))
(deftest no-model-file-test
- (is (thrown? FileNotFoundException (make-sentence-detector "nonexistantfile")))
+ (is (thrown? FileNotFoundException
+ (make-sentence-detector "nonexistantfile")))
(is (thrown? FileNotFoundException (make-tokenizer "nonexistantfile")))
(is (thrown? FileNotFoundException (make-pos-tagger "nonexistantfile")))
(is (thrown? FileNotFoundException (make-name-finder "nonexistantfile"))))
@@ -83,5 +84,4 @@
(is (= (get (parse-categories outcomes-string outcomes) "CAT1")) 0.123456)
(is (= (get (parse-categories outcomes-string outcomes) "CAT2")) 0.234567)
(is (= (get (parse-categories outcomes-string outcomes) "CAT3")) 0.345678)
- (is (= (get (parse-categories outcomes-string outcomes) "CAT4")) 0.456789)
- ))
+ (is (= (get (parse-categories outcomes-string outcomes) "CAT4")) 0.456789)))
View
18 test/opennlp/test/tools/train.clj
@@ -87,17 +87,19 @@
"The third verse of the song was quite upbeat.")]
(is (= (:best-category test-cat) "Happy"))
(is (= (count (:probabilities (meta test-cat))) 2)))
-
+
(let [test-cat (get-category
"There was a sense of foreboding at the outset.")]
(is (= (:best-category test-cat) "Unhappy"))
- (is (= (count (:probabilities (meta test-cat))) 2)))
- (is (= (:best-category (get-category
- "The sun was shining, smiles everywhere."))
+ (is (= (count (:probabilities (meta test-cat))) 2)))
+ (is (= (:best-category
+ (get-category "The sun was shining, smiles everywhere."))
"Happy"))
- (is (= (:best-category (get-category
- "The confused prisoner could not figure out which way to go."))
+ (is (= (:best-category
+ (get-category (str "The confused prisoner could not figure "
+ "out which way to go.")))
"Unhappy"))
- (is (= (:best-category (get-category
- "The frowning man chastized his son for not divulging the truth."))
+ (is (= (:best-category
+ (get-category (str "The frowning man chastized his son for "
+ "not divulging the truth.")))
"Unhappy"))))
Please sign in to comment.
Something went wrong with that request. Please try again.