Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOException Mark invalid java.BufferedReader.reset (BufferedReader.java:505) #30

Open
goldfeld opened this issue Oct 20, 2013 · 2 comments

Comments

@goldfeld
Copy link

I'm getting this error when I try to use the following sample code from the readme:

(with-open [rdr (clojure.java.io/reader "/tmp/bigfile")]
  (let [sentences (sentence-seq rdr get-sentences)]
    ;; process your lazy seq of sentences however you desire
    (println "first 5 sentences:")
    (clojure.pprint/pprint (take 5 sentences))))

My file exists and I'm able to do (slurp "/tmp/bigfile")
I'm new to Clojure so I'm sorry if it's a basic java interop issue. Nevertheless I successfully imported the get-sentences and sentence-seq functions and have otherwise been able to use the library without problems.

@dakrone
Copy link
Owner

dakrone commented Oct 22, 2013

Cool, I'll look into it, thanks for reporting it!

@dakrone
Copy link
Owner

dakrone commented Oct 25, 2013

Hmm.. I'm unable to reproduce it:

user=> (with-open [rdr (clojure.java.io/reader "/tmp/bigfile")]
  #_=>   (let [sentences (sentence-seq rdr get-sentences)]
  #_=>     ;; process your lazy seq of sentences however you desire
  #_=>     (println "first 5 sentences:")
  #_=>     (clojure.pprint/pprint (take 5 sentences))))
first 5 sentences:
("this is a sentence."
 "this is a sentence."
 "this is a sentence."
 "this is a sentence."
 "this is a sentence.")
nil

What version of clojure-opennlp are you using? What are the contents of /tmp/bigfile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants