Hi William,

Thanks for your reply.

My project uses OpenNLP 1.6.0. I have properly referenced both the
*opennlp-tools-1.6.0.jar* and* opennlp-uima-1.6.0.jar* libraries. This is
also reflected in the* .classpath* of my project.

This error is therefore quite puzzling to me. I also have other projects
using OpenNLP 1.6.0 yet they are able to load the model successfully.

Regards,
David

On Fri, Jan 13, 2017 at 9:56 AM, William Colen <william.co...@gmail.com>
wrote:

> Hi, David,
>
> from this:
>
> opennlp.tools.util.InvalidFormatException: Model version 1.6.0 is not
> supported by this (1.5.3) version of OpenNLP!
>
> I believe you created models using OpenNLP 1.6.0. You are trying to use the
> models in OpenNLP 1.5.3. Please check the version of your runtime.
>
> Regards,
> William
>
>
> 2017-01-12 23:51 GMT-02:00 David Samuel Lim <beitrik2...@gmail.com>:
>
> > Hello,
> >
> > I am currently facing an issue with regards to loading a custom trained
> NER
> > model.
> >
> > My project uses OpenNLP 1.6.0 and is developed using Eclipse IDE. The
> model
> > was also trained using OpenNLP 1.6.0.
> >
> > However, when I try to load the model *InputStream* into a
> > *TokenNameFinderModel* object, I get the following error:
> >
> > java.lang.IllegalArgumentException :
> > opennlp.tools.util.InvalidFormatException: Model version 1.6.0 is not
> > supported by this (1.5.3) version of OpenNLP!
> >
> >
> > Based on info I've gathered from sites like StackOverflow (such as this
> > <http://stackoverflow.com/questions/33250241/why-is-a-
> > self-trained-ner-model-incompatible-with-the-version-of-opennlp>
> > question), I get the sense that if I want to use a custom trained model
> in
> > OpenNLP 1.6.0, it has to be trained using OpenNLP 1.5.3. However, I
> > personally do not think that is the case, as I have other Java projects
> > using OpenNLP 1.6.0, and they were able to load the model successfully.
> >
> > The *.classpath* of my project also shows that the project is referencing
> > the OpenNLP 1.6.0 libraries.
> >
> > I know the question is rather vague, but if anyone has any insight into
> why
> > this could be happening, please let me know! Help is greatly appreciated.
> >
> > *To sum up: Unable to load custom trained OpenNLP Name Finder model in
> code
> > due to apparent OpenNLP version incompatibility. Model was trained in
> > OpenNLP 1.6.0, which my project also uses. Other projects also using
> 1.6.0
> > were able to load the model successfully.*
> >
> > Regards,
> >
> > David Lim
> >
>

Reply via email to