You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@opennlp.apache.org by Amal Elmah <am...@hotmail.com> on 2011/06/11 15:19:54 UTC

OPENNLP tools

Hi,
 
I tried to use Opennlp tools so I downloaded the apache-opennlp-1.5.1-incubating-bin.zip from the following page http://incubator.apache.org/opennlp/download.cgi
then I unzip this folder 
I followed the instructions in the documentation http://incubator.apache.org/opennlp/documentation/manual/opennlp.html to try to make a tocknizer 
so I wrote the following in the command line
 
C:\Pipe\apache-opennlp-1.5.1-incubating-bin\apache-opennlp-1.5.1-incubating> bin\opennlp.bat SimpleTokenizer
 
bu I have got the following error! what does this error mean?????

\Java\jdk1.6.0_25\bin\bin\java was unexpected at this time.

thanks,
Amal 		 	   		  

Re: OPENNLP tools

Posted by Steve Eynon <st...@alienfactory.co.uk>.
Yeah, you need to use the .bin files "as is", without renaming or
unzipping them.
--
Steve Eynon
-------------------------------
"If at first you don't succeed,
   so much for skydiving!"



On 12 June 2011 00:57, Olivier Grisel <ol...@ensta.org> wrote:
> 2011/6/11 Amal Elmah <am...@hotmail.com>:
>>
>> I downloaded models from the same page but when I right click on the model then choose save as
>> It is saved as *****.zip file on my computer and when I unzip I found *****.model file not *****.bin
>> It is really strange!
>> Could you please try ?
>> I downloaded them twice until now and the same thing happens.
>
> Well, just save the original files with there original names without
> unzipping them. Your browser might be trying to be smart where it
> should not.
>
> --
> Olivier
> http://twitter.com/ogrisel - http://github.com/ogrisel
>

Re: OPENNLP tools

Posted by Olivier Grisel <ol...@ensta.org>.
2011/6/11 Amal Elmah <am...@hotmail.com>:
>
> I downloaded models from the same page but when I right click on the model then choose save as
> It is saved as *****.zip file on my computer and when I unzip I found *****.model file not *****.bin
> It is really strange!
> Could you please try ?
> I downloaded them twice until now and the same thing happens.

Well, just save the original files with there original names without
unzipping them. Your browser might be trying to be smart where it
should not.

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

RE: OPENNLP tools

Posted by Amal Elmah <am...@hotmail.com>.
I downloaded models from the same page but when I right click on the model then choose save as 
It is saved as *****.zip file on my computer and when I unzip I found *****.model file not *****.bin 
It is really strange!
Could you please try ?
I downloaded them twice until now and the same thing happens.
 
Best,
Amal
 
> From: steve.eynon@alienfactory.co.uk
> Date: Sun, 12 Jun 2011 00:06:02 +0800
> Subject: Re: OPENNLP tools
> To: opennlp-users@incubator.apache.org
> 
> It seems you have java on your path so you don't need to worry about
> JAVA_HOME or the JAVA_CMD variable. You can change the last line of
> the .bat file to:
> 
> java -Xmx1024m -jar %OPENNLP_HOME%\lib\opennlp-tools-*.jar %*
> 
> Note: I decreased the java heap size to 1024m, as the previous value
> of 4096m (4 Gb!) is way too large for my laptop!
> 
> I don't know where you got your .model files from but I downloaded my
> .bin files from here:
> 
> http://opennlp.sourceforge.net/models-1.5/
> 
> (This was a few months ago now but I assume they've not changed.)
> 
> Steve.
> --
> Steve Eynon
> -------------------------------
> "If at first you don't succeed,
>    so much for skydiving!"
> 
> 
> 
> 
> 
> On 11 June 2011 23:20, Amal Elmah <am...@hotmail.com> wrote:
> >
> > Hi ,
> >
> > thanks alot Steve it works well when I write
> > java -jar lib\opennlp-tools-*.jar
> >
> > How can I solve  JAVA_HOME problem?
> > I noticed that opennlp.bat file contains some variables that have no values such as
> > JAVA_ACM
> > OPENNLP_HOME
> > should I set value to them ??
> >
> > and I noticed that all the models I donloaded have the extention .model not .bin ?? I there any difference and How can I download models with bin extention
> > so I can use them as in the documentation, I follow the instructions in the documentation because I am beginner and no nothing about using opennlp
> >  toos
> >
> > Best,
> > Amal
> >
> >> From: steve.eynon@alienfactory.co.uk
> >> Date: Sat, 11 Jun 2011 21:51:54 +0800
> >> Subject: Re: OPENNLP tools
> >> To: opennlp-users@incubator.apache.org
> >>
> >> Sounds like your JAVA_HOME environment variable is a bit screwy - try
> >> this from the same place:
> >>
> >> >java -jar lib\opennlp-tools-*.jar
> >>
> >> But given OpenNLP is primarily a Java API, I think you may struggle
> >> trying to use it purely as a command line tool.
> >>
> >> Steve.
> >> --
> >> Steve Eynon
> >> -------------------------------
> >> "If at first you don't succeed,
> >>    so much for skydiving!"
> >>
> >>
> >> On 11 June 2011 21:19, Amal Elmah <am...@hotmail.com> wrote:
> >> >
> >> > Hi,
> >> >
> >> > I tried to use Opennlp tools so I downloaded the apache-opennlp-1.5.1-incubating-bin.zip from the following page http://incubator.apache.org/opennlp/download.cgi
> >> > then I unzip this folder
> >> > I followed the instructions in the documentation http://incubator.apache.org/opennlp/documentation/manual/opennlp.html to try to make a tocknizer
> >> > so I wrote the following in the command line
> >> >
> >> > C:\Pipe\apache-opennlp-1.5.1-incubating-bin\apache-opennlp-1.5.1-incubating> bin\opennlp.bat SimpleTokenizer
> >> >
> >> > bu I have got the following error! what does this error mean?????
> >> >
> >> > \Java\jdk1.6.0_25\bin\bin\java was unexpected at this time.
> >> >
> >> > thanks,
> >> > Amal
> >
 		 	   		  

Re: OPENNLP tools

Posted by Steve Eynon <st...@alienfactory.co.uk>.
It seems you have java on your path so you don't need to worry about
JAVA_HOME or the JAVA_CMD variable. You can change the last line of
the .bat file to:

java -Xmx1024m -jar %OPENNLP_HOME%\lib\opennlp-tools-*.jar %*

Note: I decreased the java heap size to 1024m, as the previous value
of 4096m (4 Gb!) is way too large for my laptop!

I don't know where you got your .model files from but I downloaded my
.bin files from here:

http://opennlp.sourceforge.net/models-1.5/

(This was a few months ago now but I assume they've not changed.)

Steve.
--
Steve Eynon
-------------------------------
"If at first you don't succeed,
   so much for skydiving!"





On 11 June 2011 23:20, Amal Elmah <am...@hotmail.com> wrote:
>
> Hi ,
>
> thanks alot Steve it works well when I write
> java -jar lib\opennlp-tools-*.jar
>
> How can I solve  JAVA_HOME problem?
> I noticed that opennlp.bat file contains some variables that have no values such as
> JAVA_ACM
> OPENNLP_HOME
> should I set value to them ??
>
> and I noticed that all the models I donloaded have the extention .model not .bin ?? I there any difference and How can I download models with bin extention
> so I can use them as in the documentation, I follow the instructions in the documentation because I am beginner and no nothing about using opennlp
>  toos
>
> Best,
> Amal
>
>> From: steve.eynon@alienfactory.co.uk
>> Date: Sat, 11 Jun 2011 21:51:54 +0800
>> Subject: Re: OPENNLP tools
>> To: opennlp-users@incubator.apache.org
>>
>> Sounds like your JAVA_HOME environment variable is a bit screwy - try
>> this from the same place:
>>
>> >java -jar lib\opennlp-tools-*.jar
>>
>> But given OpenNLP is primarily a Java API, I think you may struggle
>> trying to use it purely as a command line tool.
>>
>> Steve.
>> --
>> Steve Eynon
>> -------------------------------
>> "If at first you don't succeed,
>>    so much for skydiving!"
>>
>>
>> On 11 June 2011 21:19, Amal Elmah <am...@hotmail.com> wrote:
>> >
>> > Hi,
>> >
>> > I tried to use Opennlp tools so I downloaded the apache-opennlp-1.5.1-incubating-bin.zip from the following page http://incubator.apache.org/opennlp/download.cgi
>> > then I unzip this folder
>> > I followed the instructions in the documentation http://incubator.apache.org/opennlp/documentation/manual/opennlp.html to try to make a tocknizer
>> > so I wrote the following in the command line
>> >
>> > C:\Pipe\apache-opennlp-1.5.1-incubating-bin\apache-opennlp-1.5.1-incubating> bin\opennlp.bat SimpleTokenizer
>> >
>> > bu I have got the following error! what does this error mean?????
>> >
>> > \Java\jdk1.6.0_25\bin\bin\java was unexpected at this time.
>> >
>> > thanks,
>> > Amal
>

RE: OPENNLP tools

Posted by Amal Elmah <am...@hotmail.com>.
Hi ,
 
thanks alot Steve it works well when I write 
java -jar lib\opennlp-tools-*.jar

How can I solve  JAVA_HOME problem? 
I noticed that opennlp.bat file contains some variables that have no values such as 
JAVA_ACM
OPENNLP_HOME 
should I set value to them ??
 
and I noticed that all the models I donloaded have the extention .model not .bin ?? I there any difference and How can I download models with bin extention 
so I can use them as in the documentation, I follow the instructions in the documentation because I am beginner and no nothing about using opennlp
 toos
 
Best,
Amal
 
> From: steve.eynon@alienfactory.co.uk
> Date: Sat, 11 Jun 2011 21:51:54 +0800
> Subject: Re: OPENNLP tools
> To: opennlp-users@incubator.apache.org
> 
> Sounds like your JAVA_HOME environment variable is a bit screwy - try
> this from the same place:
> 
> >java -jar lib\opennlp-tools-*.jar
> 
> But given OpenNLP is primarily a Java API, I think you may struggle
> trying to use it purely as a command line tool.
> 
> Steve.
> --
> Steve Eynon
> -------------------------------
> "If at first you don't succeed,
>    so much for skydiving!"
> 
> 
> On 11 June 2011 21:19, Amal Elmah <am...@hotmail.com> wrote:
> >
> > Hi,
> >
> > I tried to use Opennlp tools so I downloaded the apache-opennlp-1.5.1-incubating-bin.zip from the following page http://incubator.apache.org/opennlp/download.cgi
> > then I unzip this folder
> > I followed the instructions in the documentation http://incubator.apache.org/opennlp/documentation/manual/opennlp.html to try to make a tocknizer
> > so I wrote the following in the command line
> >
> > C:\Pipe\apache-opennlp-1.5.1-incubating-bin\apache-opennlp-1.5.1-incubating> bin\opennlp.bat SimpleTokenizer
> >
> > bu I have got the following error! what does this error mean?????
> >
> > \Java\jdk1.6.0_25\bin\bin\java was unexpected at this time.
> >
> > thanks,
> > Amal
 		 	   		  

Re: OPENNLP tools

Posted by Steve Eynon <st...@alienfactory.co.uk>.
Sounds like your JAVA_HOME environment variable is a bit screwy - try
this from the same place:

>java -jar lib\opennlp-tools-*.jar

But given OpenNLP is primarily a Java API, I think you may struggle
trying to use it purely as a command line tool.

Steve.
--
Steve Eynon
-------------------------------
"If at first you don't succeed,
   so much for skydiving!"


On 11 June 2011 21:19, Amal Elmah <am...@hotmail.com> wrote:
>
> Hi,
>
> I tried to use Opennlp tools so I downloaded the apache-opennlp-1.5.1-incubating-bin.zip from the following page http://incubator.apache.org/opennlp/download.cgi
> then I unzip this folder
> I followed the instructions in the documentation http://incubator.apache.org/opennlp/documentation/manual/opennlp.html to try to make a tocknizer
> so I wrote the following in the command line
>
> C:\Pipe\apache-opennlp-1.5.1-incubating-bin\apache-opennlp-1.5.1-incubating> bin\opennlp.bat SimpleTokenizer
>
> bu I have got the following error! what does this error mean?????
>
> \Java\jdk1.6.0_25\bin\bin\java was unexpected at this time.
>
> thanks,
> Amal