map,
>> >> new BioCodec()
>> >> );
>> >>
>> >> try {
>> >>
>> >> TrainingParameters mlParams = new
>> >> TrainingParameters();
&
OutputStream modelOut = new
> >> BufferedOutputStream(new FileOutputStream(SERIALIZED))) {
> >> model.serialize(modelOut);
> >> }
> >>
> >> } catch (Exception ex) {
> >> ex.printS
osTagger (String modelName) {
>>
>> try (InputStream modelIn = new FileInputStream(modelName)) {
>> POSModel model = new POSModel(modelIn);
>> return model;
>> }
>> catch (Exception ex) { ex.printStackTrace(); }
&g
>>> > > On Mon, Jun 5, 2017 at 3:43 PM, Damiano Porta <
>>> damianopo...@gmail.com>
>>> > > wrote:
>>> > >
>>> > > > Hello,
>>> > > > i am using the POSTaggerFeatureGenerator via generators.xml
>>> > > >
>>> > > >
>>> > > >
>>> > > > 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.(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.IllegalStateExceptio
>>> > n:
>>> > > > Missing serializer for postagger.bin
>>> > > >
>>> > > > Do i have to change the extension of the file?
>>> > > >
>>> > > > Thanks
>>> > > >
>>> > >
>>> >
>>>
>>
>>
>
> > > >
>> > > > 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.(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.IllegalStateExceptio
>> > n:
>> > > > Missing serializer for postagger.bin
>> > > >
>> > > > Do i have to change the extension of the file?
>> > > >
>> > > > Thanks
>> > > >
>> > >
>> >
>>
>
>
axent.bin
> > > at opennlp.tools.util.model.BaseModel.serialize(BaseModel.java:589)
> > > at com.damiano.nlp.ner.trainer.Trainer.(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.IllegalStateExceptio
> n:
> > > Missing serializer for postagger.bin
> > >
> > > Do i have to change the extension of the file?
> > >
> > > Thanks
> > >
> >
>
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
>