I'm trying to use the pos perceptron model but I got the following exception:
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:223)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:154)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:320)
at java.io.DataInputStream.readUTF(DataInputStream.java:572)
at java.io.DataInputStream.readUTF(DataInputStream.java:547)
at opennlp.model.BinaryFileDataReader.readUTF(BinaryFileDataReader.java:61)
at opennlp.model.AbstractModelReader.readUTF(AbstractModelReader.java:82)
at opennlp.model.GenericModelReader.checkModelType(GenericModelReader.java:41)
at opennlp.model.AbstractModelReader.getModel(AbstractModelReader.java:86)
at opennlp.tools.util.model.GenericModelSerializer.create(GenericModelSerializer.java:35)
at opennlp.tools.util.model.GenericModelSerializer.create(GenericModelSerializer.java:31)
at opennlp.tools.util.model.BaseModel.<init>(BaseModel.java:135)
at opennlp.tools.postag.POSModel.<init>(POSModel.java:96)
Any ideas?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can reproduce the problem, have to investigate it. As a work around I suggest to use the maxent model until the issue with the perceptron model is fixed.
Jörn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a bug in a piece of maxent code I worked on. I will open a bug report over at the maxent project.
Luckily the models will work with the released version after re-training them with the fixed maxent code.
I will upload new models soon.
Jörn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Where can I download the models for opennlp-tools 1.5, as when I use the ones from 1.4 I get the following error
Thanks
I updated the models page yesterday.
Here is the direct link:
http://www.opennlp.org/models-1.5/
If you have any issues please report back to us.
Hope that helps,
Jörn
We also started to write some documentation which might be helpful:
https://sourceforge.net/apps/mediawiki/opennlp/index.php?title=Main_Page
Jörn
Thanks for the quick response
Hi Jörn,
I'm trying to use the pos perceptron model but I got the following exception:
Any ideas?
Thanks
Yes the model you are loading is somehow damaged / invalid.
Did you get the model form our download page ? Which language ?
You can try to download it again, maybe that damaged the model.
Jörn
I downloaded from: http://www.opennlp.org/models-1.5/en-pos-perceptron.bin
I tried three times, same result.
Thanks,
edgar
I can reproduce the problem, have to investigate it. As a work around I suggest to use the maxent model until the issue with the perceptron model is fixed.
Jörn
Sure, no problem and thanks.
What are the pros and cons of these two models?
Thank you,
The perceptron model was added by Tom Morton, and he did write a nice blog post about it:
http://annotation.org/index.php/blog
Its the last post: "Average Perceptron Algorithm Better Than Average."
Jörn
There is a bug in a piece of maxent code I worked on. I will open a bug report over at the maxent project.
Luckily the models will work with the released version after re-training them with the fixed maxent code.
I will upload new models soon.
Jörn
Here is a link to the ticket over at the maxent sourceforge project:
https://sourceforge.net/tracker/?func=detail&aid=3077040&group_id=5961&atid=105961
I will now re-train the perceptron models and upload them.
Jörn
New perceptron models are uploaded now.
Jörn