You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@opennlp.apache.org by Sascha Wolfer <sa...@cognition.uni-freiburg.de> on 2010/12/05 23:30:02 UTC

Problems with R package "openNLP"

Dear list,

after searching for several hours in documentations and the web and 
stuff, I didn't find any solution for my problem, so here it goes...

I want to use openNLP with R, using the package "openNLP" and the model 
for german. So I did the following in R:

 > install.packages("openNLP")
 > install.packages("openNLPmodels.de", type = "source", repos = 
"http://datacube.wu.ac.at")

Everything seems to be installed correctly. So I tried this simple example:

 > s <- "Dies ist ein Satz. Und hier ist noch einer."
 > sentDetect(s, model = "openNLPmodels.de")

Now here goes the error I get when doing this:

Fehler in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader", 
.jnew("java.io.File",  :
   java.io.FileNotFoundException: openNLPmodels.de (Das System kann die 
angegebene Datei nicht finden)

Translation:

Error in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader", 
.jnew("java.io.File",  :
   java.io.FileNotFoundException: openNLPmodels.de (System cannot find 
the specified file)

Does anyone have an idea what the problem is? Perhaps I'm doing 
something awefully wrong here... do I have to install more than the R 
package(s) to get this running in R?

I'm on Win 7 with R 2.12.0, but I get exactly the same error on my Mac.

Thanks in advance,
Sascha W.

Re: Problems with R package "openNLP"

Posted by Jörn Kottmann <ko...@gmail.com>.
Sorry, I do not know much about the R package. Its not a part of the project
here. Maybe they have their own mailing list where you can ask?

Jörn


On 12/5/10 11:30 PM, Sascha Wolfer wrote:
> Dear list,
>
> after searching for several hours in documentations and the web and 
> stuff, I didn't find any solution for my problem, so here it goes...
>
> I want to use openNLP with R, using the package "openNLP" and the 
> model for german. So I did the following in R:
>
> > install.packages("openNLP")
> > install.packages("openNLPmodels.de", type = "source", repos = 
> "http://datacube.wu.ac.at")
>
> Everything seems to be installed correctly. So I tried this simple 
> example:
>
> > s <- "Dies ist ein Satz. Und hier ist noch einer."
> > sentDetect(s, model = "openNLPmodels.de")
>
> Now here goes the error I get when doing this:
>
> Fehler in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader", 
> .jnew("java.io.File",  :
>   java.io.FileNotFoundException: openNLPmodels.de (Das System kann die 
> angegebene Datei nicht finden)
>
> Translation:
>
> Error in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader", 
> .jnew("java.io.File",  :
>   java.io.FileNotFoundException: openNLPmodels.de (System cannot find 
> the specified file)
>
> Does anyone have an idea what the problem is? Perhaps I'm doing 
> something awefully wrong here... do I have to install more than the R 
> package(s) to get this running in R?
>
> I'm on Win 7 with R 2.12.0, but I get exactly the same error on my Mac.
>
> Thanks in advance,
> Sascha W.


Re: Problems with R package "openNLP"

Posted by Sascha Wolfer <sa...@cognition.uni-freiburg.de>.
I'm sorry - I forgot...

Of course I loaded the R packages before trying function sentDetect() with

 > library(openNLP)
 > library(openNLPmodels.de)

Thanks again!

Sascha W.

Am 05.12.2010 23:30, schrieb Sascha Wolfer:
> Dear list,
>
> after searching for several hours in documentations and the web and
> stuff, I didn't find any solution for my problem, so here it goes...
>
> I want to use openNLP with R, using the package "openNLP" and the model
> for german. So I did the following in R:
>
>  > install.packages("openNLP")
>  > install.packages("openNLPmodels.de", type = "source", repos =
> "http://datacube.wu.ac.at")
>
> Everything seems to be installed correctly. So I tried this simple example:
>
>  > s <- "Dies ist ein Satz. Und hier ist noch einer."
>  > sentDetect(s, model = "openNLPmodels.de")
>
> Now here goes the error I get when doing this:
>
> Fehler in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader",
> .jnew("java.io.File", :
> java.io.FileNotFoundException: openNLPmodels.de (Das System kann die
> angegebene Datei nicht finden)
>
> Translation:
>
> Error in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader",
> .jnew("java.io.File", :
> java.io.FileNotFoundException: openNLPmodels.de (System cannot find the
> specified file)
>
> Does anyone have an idea what the problem is? Perhaps I'm doing
> something awefully wrong here... do I have to install more than the R
> package(s) to get this running in R?
>
> I'm on Win 7 with R 2.12.0, but I get exactly the same error on my Mac.
>
> Thanks in advance,
> Sascha W.

Re: Problems with R package "openNLP"

Posted by Sascha Wolfer <sa...@cognition.uni-freiburg.de>.
Hello,

I also tried the general R help lists, no success there till now.

Just wanted to let you know the solution to the problem as Kurt Hornik 
pointed it out to me:

- The package openNLPmodels.de is here:
http://datacube.wu.ac.at/src/contrib/openNLPmodels.de_1.5.0-1.tar.gz

- Kurt Hornik let me know that they're in the middle of a major rewrite 
so I should try to use the old version located here:
http://datacube.wu.ac.at/src/contrib/archive/openNLPmodels.de_0.0-4.tar.gz

After downloading the file and doing this:
 > install.packages("~/openNLPmodels.de_0.0-4.tar.gz", repos = NULL, 
type = "source")
 > library(openNLPmodels.de)

it seems to work just fine.

So the problem seems to be with the current version of openNLPmodels.de.

Thanks for your time,
Sascha W.

Am 06.12.10 09:43, schrieb reinhard schwab:
> http://cran.r-project.org/src/contrib/
>
> i dont see there any models for german.
> i see there only models for english and spanish.
> the maintainer for the english models is Kurt.Hornik@R-project.org
> the mailing lists for R are listed here
> http://www.r-project.org/mail.html
>
> i guess you can install the german models from the download site of
> opennlp and
> keep the directory structure like the package for english.
>
> reinhard@thord:>tar -zxvf openNLPmodels.en_0.0-4.tar.gz
> openNLPmodels.en/
> openNLPmodels.en/DESCRIPTION
> openNLPmodels.en/inst/
> openNLPmodels.en/inst/models/
> openNLPmodels.en/inst/models/sentdetect/
> openNLPmodels.en/inst/models/sentdetect/EnglishSD.bin.gz
> openNLPmodels.en/inst/models/parser/
> openNLPmodels.en/inst/models/parser/head_rules
> openNLPmodels.en/inst/models/parser/tag.bin.gz
> openNLPmodels.en/inst/models/parser/tagdict
> openNLPmodels.en/inst/models/tokenize/
> openNLPmodels.en/inst/models/tokenize/EnglishTok.bin.gz
>
>
> regards
> reinhard
>
> Am 06.12.2010 09:06, schrieb Sascha Wolfer:
>> Hello and thanks for your answers,
>>
>> as I didn't catch any errors installing and loading the packages, I
>> guess this shouldn't be the problem - unless I have to install
>> something else than the packages "openNLP" and "openNLPmodels.de" in R.
>>
>> I didn't find any help list regarding the R packages, so I thought
>> this is the right place to post this - sorry if this is not the case.
>>
>> Thanks,
>> Sascha W.
>>
>> Am 06.12.2010 01:05, schrieb reinhard schwab:
>>> i guess you have not installed the language models.
>>> have you installed them?
>>>
>>> because you get an error message
>>>
>>> Error in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader",
>>> .jnew("java.io.File",  :
>>>     java.io.FileNotFoundException: openNLPmodels.de (System cannot find
>>> the specified file)
>>>
>>> regards
>>>
>>>
>>> Am 05.12.2010 23:30, schrieb Sascha Wolfer:
>>>> Dear list,
>>>>
>>>> after searching for several hours in documentations and the web and
>>>> stuff, I didn't find any solution for my problem, so here it goes...
>>>>
>>>> I want to use openNLP with R, using the package "openNLP" and the
>>>> model for german. So I did the following in R:
>>>>
>>>>> install.packages("openNLP")
>>>>> install.packages("openNLPmodels.de", type = "source", repos =
>>>> "http://datacube.wu.ac.at")
>>>>
>>>> Everything seems to be installed correctly. So I tried this simple
>>>> example:
>>>>
>>>>> s<- "Dies ist ein Satz. Und hier ist noch einer."
>>>>> sentDetect(s, model = "openNLPmodels.de")
>>>>
>>>> Now here goes the error I get when doing this:
>>>>
>>>> Fehler in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader",
>>>> .jnew("java.io.File",  :
>>>>     java.io.FileNotFoundException: openNLPmodels.de (Das System kann die
>>>> angegebene Datei nicht finden)
>>>>
>>>> Translation:
>>>>
>>>> Error in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader",
>>>> .jnew("java.io.File",  :
>>>>     java.io.FileNotFoundException: openNLPmodels.de (System cannot find
>>>> the specified file)
>>>>
>>>> Does anyone have an idea what the problem is? Perhaps I'm doing
>>>> something awefully wrong here... do I have to install more than the R
>>>> package(s) to get this running in R?
>>>>
>>>> I'm on Win 7 with R 2.12.0, but I get exactly the same error on my Mac.
>>>>
>>>> Thanks in advance,
>>>> Sascha W.
>>>>
>>>
>>
>

Re: Problems with R package "openNLP"

Posted by reinhard schwab <re...@aon.at>.
http://cran.r-project.org/src/contrib/

i dont see there any models for german.
i see there only models for english and spanish.
the maintainer for the english models is Kurt.Hornik@R-project.org
the mailing lists for R are listed here
http://www.r-project.org/mail.html

i guess you can install the german models from the download site of
opennlp and
keep the directory structure like the package for english.

reinhard@thord:>tar -zxvf openNLPmodels.en_0.0-4.tar.gz
openNLPmodels.en/
openNLPmodels.en/DESCRIPTION
openNLPmodels.en/inst/
openNLPmodels.en/inst/models/
openNLPmodels.en/inst/models/sentdetect/
openNLPmodels.en/inst/models/sentdetect/EnglishSD.bin.gz
openNLPmodels.en/inst/models/parser/
openNLPmodels.en/inst/models/parser/head_rules
openNLPmodels.en/inst/models/parser/tag.bin.gz
openNLPmodels.en/inst/models/parser/tagdict
openNLPmodels.en/inst/models/tokenize/
openNLPmodels.en/inst/models/tokenize/EnglishTok.bin.gz


regards
reinhard

Am 06.12.2010 09:06, schrieb Sascha Wolfer:
> Hello and thanks for your answers,
>
> as I didn't catch any errors installing and loading the packages, I
> guess this shouldn't be the problem - unless I have to install
> something else than the packages "openNLP" and "openNLPmodels.de" in R.
>
> I didn't find any help list regarding the R packages, so I thought
> this is the right place to post this - sorry if this is not the case.
>
> Thanks,
> Sascha W.
>
> Am 06.12.2010 01:05, schrieb reinhard schwab:
>> i guess you have not installed the language models.
>> have you installed them?
>>
>> because you get an error message
>>
>> Error in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader",
>> .jnew("java.io.File",  :
>>    java.io.FileNotFoundException: openNLPmodels.de (System cannot find
>> the specified file)
>>
>> regards
>>
>>
>> Am 05.12.2010 23:30, schrieb Sascha Wolfer:
>>> Dear list,
>>>
>>> after searching for several hours in documentations and the web and
>>> stuff, I didn't find any solution for my problem, so here it goes...
>>>
>>> I want to use openNLP with R, using the package "openNLP" and the
>>> model for german. So I did the following in R:
>>>
>>>> install.packages("openNLP")
>>>> install.packages("openNLPmodels.de", type = "source", repos =
>>> "http://datacube.wu.ac.at")
>>>
>>> Everything seems to be installed correctly. So I tried this simple
>>> example:
>>>
>>>> s<- "Dies ist ein Satz. Und hier ist noch einer."
>>>> sentDetect(s, model = "openNLPmodels.de")
>>>
>>> Now here goes the error I get when doing this:
>>>
>>> Fehler in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader",
>>> .jnew("java.io.File",  :
>>>    java.io.FileNotFoundException: openNLPmodels.de (Das System kann die
>>> angegebene Datei nicht finden)
>>>
>>> Translation:
>>>
>>> Error in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader",
>>> .jnew("java.io.File",  :
>>>    java.io.FileNotFoundException: openNLPmodels.de (System cannot find
>>> the specified file)
>>>
>>> Does anyone have an idea what the problem is? Perhaps I'm doing
>>> something awefully wrong here... do I have to install more than the R
>>> package(s) to get this running in R?
>>>
>>> I'm on Win 7 with R 2.12.0, but I get exactly the same error on my Mac.
>>>
>>> Thanks in advance,
>>> Sascha W.
>>>
>>
>


Re: Problems with R package "openNLP"

Posted by Sascha Wolfer <sa...@cognition.uni-freiburg.de>.
Hello and thanks for your answers,

as I didn't catch any errors installing and loading the packages, I 
guess this shouldn't be the problem - unless I have to install something 
else than the packages "openNLP" and "openNLPmodels.de" in R.

I didn't find any help list regarding the R packages, so I thought this 
is the right place to post this - sorry if this is not the case.

Thanks,
Sascha W.

Am 06.12.2010 01:05, schrieb reinhard schwab:
> i guess you have not installed the language models.
> have you installed them?
>
> because you get an error message
>
> Error in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader",
> .jnew("java.io.File",  :
>    java.io.FileNotFoundException: openNLPmodels.de (System cannot find
> the specified file)
>
> regards
>
>
> Am 05.12.2010 23:30, schrieb Sascha Wolfer:
>> Dear list,
>>
>> after searching for several hours in documentations and the web and
>> stuff, I didn't find any solution for my problem, so here it goes...
>>
>> I want to use openNLP with R, using the package "openNLP" and the
>> model for german. So I did the following in R:
>>
>>> install.packages("openNLP")
>>> install.packages("openNLPmodels.de", type = "source", repos =
>> "http://datacube.wu.ac.at")
>>
>> Everything seems to be installed correctly. So I tried this simple
>> example:
>>
>>> s<- "Dies ist ein Satz. Und hier ist noch einer."
>>> sentDetect(s, model = "openNLPmodels.de")
>>
>> Now here goes the error I get when doing this:
>>
>> Fehler in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader",
>> .jnew("java.io.File",  :
>>    java.io.FileNotFoundException: openNLPmodels.de (Das System kann die
>> angegebene Datei nicht finden)
>>
>> Translation:
>>
>> Error in .jnew("opennlp/maxent/io/SuffixSensitiveGISModelReader",
>> .jnew("java.io.File",  :
>>    java.io.FileNotFoundException: openNLPmodels.de (System cannot find
>> the specified file)
>>
>> Does anyone have an idea what the problem is? Perhaps I'm doing
>> something awefully wrong here... do I have to install more than the R
>> package(s) to get this running in R?
>>
>> I'm on Win 7 with R 2.12.0, but I get exactly the same error on my Mac.
>>
>> Thanks in advance,
>> Sascha W.
>>
>