Uploaded image for project: 'OpenNLP'
  1. OpenNLP
  2. OPENNLP-1092

PosTagger serialization in namefinder model

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.0, 1.8.1
    • 1.8.1
    • Name Finder
    • None
    • Ubuntu 16.04 - Intel Core i7 6700k - Openjdk version 1.8.0_131

    Description

      I am getting an error during the serialization of the post tagger inside a name finder model.

      The error is: java.lang.IllegalStateException: Missing serializer for postagger.bin

      I am having this problem via API and via cmd NameFinderTrainer tool.

      The command is:
      opennlp TokenNameFinderTrainer -data /home/damiano/corpus.train -lang it -model /home/damiano/model.bin -featuregen /home/damiano/test.xml -sequenceCodec BIO -resources /home/damiano/lavoro/java/Parser/src/main/resources/

      The output is:
      Writing name finder model ... Compressed 885605 parameters to 94030
      3451 outcome patterns
      Exception in thread "main" java.lang.IllegalStateException: Missing serializer for postagger.bin
      	at opennlp.tools.util.model.BaseModel.serialize(BaseModel.java:592)
      	at opennlp.tools.cmdline.CmdLineUtil.writeModel(CmdLineUtil.java:182)
      	at opennlp.tools.cmdline.namefind.TokenNameFinderTrainerTool.run(TokenNameFinderTrainerTool.java:188)
      	at opennlp.tools.cmdline.CLI.main(CLI.java:244)
      

      My generators.xml is:

      <?xml version="1.0" encoding="UTF-8"?>
      <generators>
          <cache>
              <generators>
                  <window prevLength="4" nextLength="2">
                      <tokenclass />
                  </window>
                  <window prevLength="4" nextLength="2">
                      <token />
                  </window> 
                  <!-- Pos Tagger -->                
                  <window prevLength="4" nextLength="2">
                      <tokenpos model="postagger.bin" />
                  </window> 
                  <definition />
                  <prevmap />
                  <bigram />
                  <sentence begin="true" end="false" />          
              </generators>
          </cache>
      </generators>
      

      Attachments

        Issue Links

          Activity

            People

              joern Jörn Kottmann
              damianoporta Damiano Porta
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: