Skip to content

Commit

Permalink
POSDictionary/create expects an input stream, not a reader. Fixes dak…
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrone committed Jul 6, 2013
1 parent ad3183c commit 1ba7ce3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/opennlp/tools/train.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns opennlp.tools.train
"This namespace contains tools used to train OpenNLP models"
(:use [clojure.java.io :only [output-stream reader]])
(:use [clojure.java.io :only [output-stream reader input-stream]])
(:import (opennlp.tools.util PlainTextByLineStream TrainingParameters)
(opennlp.tools.util.model BaseModel ModelType)
(opennlp.tools.dictionary Dictionary)
Expand Down Expand Up @@ -45,8 +45,8 @@
A POSDictionary records which part-of-speech tags a word
may be assigned"
[in]
(with-open [rdr (reader in)]
(POSDictionary/create rdr)))
(with-open [is (input-stream in)]
(POSDictionary/create is)))

(defn ^ChunkerModel train-treebank-chunker
"Returns a treebank chunker based on given training file"
Expand Down

0 comments on commit 1ba7ce3

Please sign in to comment.