Hi Ashutosh -
It looks like the UIMA wrapper code cannot find a "model". Here are some
things to check.
Step #3 of the the OpenNLPreadme.html, "Download the Model files" should
have put the model files on your disk (whever you said to download
them). These files would have names like:
C:\opennlp-models-1.3.0\english\sentdetect\EnglishSD.bin.gz
(the front part of this would depend on where you installed the files).
Notice that the filename ends in "gz" - indicating it is in GZIP
format. (Don't unzip these files... just leave them as is).
To run the UIMA wrapper, the descriptor in
/c:/program
files/apache-uima/examples/opennlp_wrappers/descriptors/opennlpsentencedetector.xml)
has to be modified to set a parameter to "point to" the model file you
downloaded in step 3 (unless of course, you downloaded the model files
to where the descriptor parameter happened to specify).
Please open this descriptor in a plain editor and look for something like:
<configurationParameterSettings>
<nameValuePair>
<name>ModelFile</name>
<value>
<string>C:\opennlp-models-1.3.0\english\sentdetect\EnglishSD.bin.gz</string>
where the value of the last element <string> should have been changed to
point to where you installed the model file.
Also, verify by using your file explorer, that wherever this parameter
setting is pointing to, has a file there in the GZIP format (its name
should end with .gz ).
Please let us know the results of these investigations.
-Marshall
Ashutosh Sharma wrote:
> Hi I want to use OpenNLP tool in UIMA to do some NLP task. I go through the
> OpenNLP readme file. But when I test the first component of opennlp 'sentence
> detector', it gives me following error:
> "org.apache.uima.resource.ResourceInitializationException: Initilization of
> annotator class "org.apache.uima.examples.opennlp.annotator.SentenceDetector"
> failed (Description: File:/c:/program
> files/apache-uima/examples/opennlp_wrappers/descriptors/opennlpsentencedetector.xml)
> causedby: org.apache-uima.resource.ResourceInitializationException Causedby:
> java.io.IOException: not in GZIP format." Can anybody help me to resolve this
> issue. Note: I have followed instructions step by step given in
> OpenNLPreadme.html file, but unable to run the OpenNLP components.
> -- Thanks & Regards, Ashutosh
> _________________________________________________________________
> Post ads for free - to sell, rent or even buy.www.yello.in
> http://ss1.richmedia.in/recurl.asp?pid=186
>