opennlp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damiano Porta <damianopo...@gmail.com>
Subject Missing serializer for postagger.bin
Date Mon, 05 Jun 2017 13:43:35 GMT
Hello,
i am using the POSTaggerFeatureGenerator via generators.xml

<tokenpos model="postagger.bin" />

during the training i add this model in the resources doing:

        HashMap<String, Object> map = new HashMap<>();
        map.put("postagger.bin", myPostaggerModel);


         factory = new TokenNameFinderFactory(
               IOUtils.toByteArray(in),
               map,
               new BioCodec()
         );

I get this error:

java.lang.IllegalStateException: Missing serializer for it-pos-maxent.bin
at opennlp.tools.util.model.BaseModel.serialize(BaseModel.java:589)
at com.damiano.nlp.ner.trainer.Trainer.<init>(Trainer.java:187)
at com.damiano.nlp.ner.trainer.Trainer.main(Trainer.java:44)
2017-06-05 15:37:35 INFO  Trainer:192 - java.lang.IllegalStateException:
Missing serializer for postagger.bin

Do i have to change the extension of the file?

Thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message