wolfe-pack / wolfe

Wolfe Language and Engine
https://wolfe-pack.github.io/wolfe
Apache License 2.0
135 stars 17 forks source link

CoNLL readers to work on InputStreams #153

Open riedelcastro opened 9 years ago

riedelcastro commented 9 years ago

Some of our datasets are saved on the classpath (and packaged in the wolfe-examples.jar). This is useful because users can just add an sbt dependency and get the data, w/o having to setup a data directory etc. It seems that the CoNLL readers require a filename though. Could this be generalized to InputStreams instead?

narad commented 9 years ago

Sure, but thinking on the grand scheme of things, would it be better to have reading from different sources be different static calls? So you have a CoNLLReader object with say...readFromFile and readFromStream methods?

On Tue, Apr 14, 2015 at 3:32 AM, Sebastian Riedel notifications@github.com wrote:

Assigned #153 https://github.com/wolfe-pack/wolfe/issues/153 to @narad https://github.com/narad.

— Reply to this email directly or view it on GitHub https://github.com/wolfe-pack/wolfe/issues/153#event-280387646.

riedelcastro commented 9 years ago

Yes, I think static convenience methods make sense. I'd imagine that the core method works with streams only, and that the convenience method convert files etc. to streams.