William,
Hmm, good idea. I'll have to try that soon... I do create models for my
project and have them included in the JAR... but, haven't gotten around
to testing with them embedded in the JAR file. I know there will be
issues with this and it is usually best to keep them in either windows
or linux file system.
Jorn has the start of supporting the web-server side; but, I know it is
far from complete... he still has this marked as a TODO for the
interface. Unless I'm a bit behind now.
Still, what errors are you getting? It may be as simple as writing a
wrapper for the InputStream for the Hadoop file system support to get
this working.
James
On 6/6/2012 10:55 PM, William Colen wrote:
> I am not sure, I never tried Hadoop, but maybe your issue is that Java
> can't access Hadoop file system, isn't it?
> Maybe you should simple add the models to a jar so the models are in the
> classpath and read it as a resource:
>
> InputStream modelIn = this.getClass().getResourceAsStream("sentence.model");
> SentenceModel model = new SentenceModel(modelIn);
> SentenceDetectorME sentenceDetector = new SentenceDetectorME(model);
> modelIn.close();
>
>
> On Wed, Jun 6, 2012 at 11:36 PM, giri <[email protected]> wrote:
>
>> i'm not able to load ModelIN either from HDFS or local file system.
>>
>> On Thu, Jun 7, 2012 at 5:04 AM, James Kosin <[email protected]> wrote:
>>
>>> What problems are you having?
>>>
>>> James
>>>
>>> On 6/6/2012 1:38 PM, giri wrote:
>>>> Hi Friends,
>>>>
>>>> I want to use OPenNLP in Mapreduce programming, but i couldn't able to
>>> load
>>>> the OpenNLP model.
>>>>
>>>> if any one have the idea or code please help me.
>>>>
>>>> Regards,
>>>> Giri.
>>>>
>>>
>>>