shubhamshubhankar / clearnlp

Automatically exported from code.google.com/p/clearnlp
Other
0 stars 0 forks source link

InputStream for EngineGetters #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
_This was originally posted at our forum by Lee Becker_

Would it be possible to add APIs to the factory methods in EngineGetters to 
accept InputStreams?  Currently they only accept modelFiles or dataFiles as 
Strings.  It would be useful to accept InputStreams so that the developer can 
decide whether it comes from a File, URL, or URI.  This will also assist 
integration into UIMA-based systems like ClearTK or cTAKES.

For example, these would all be useful interfaces:

static public DEPParser getDEPParser(InputStream modeInputStream)
static public Pair<POSTagger[],Double> getPOSTaggers(InputStream 
modelInputStream) throws Exception
static public AbstractTokenizer getTokenizer(String language, InputStream 
dictInputStream)

Thanks,
Lee

Original issue reported on code.google.com by jdcho...@gmail.com on 29 Oct 2012 at 7:02

GoogleCodeExporter commented 9 years ago
Engine getters support InputStream from the version 1.2.0.

Jinho

Original comment by jdcho...@gmail.com on 29 Oct 2012 at 7:02