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

Loading trained model (DoccatModel) throws exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Not A Problem
    • tools-1.5.3
    • None
    • Doccat

    Description

      loading traindModel (bin file) throws exception I used this code to load the bin file :

      InputStream inputStream = DocumentCategrizer.class.getClassLoader().getResourceAsStream("trainedModel/en-sport.bin");
      DoccatModel doccatModel = new DoccatModel(inputStream);

      and this is the exception I'm facing :

      SEVERE: null
      opennlp.tools.util.InvalidFormatException: Entry name must have type extension:
      at opennlp.tools.util.model.BaseModel.getEntryExtension(BaseModel.java:324)
      at opennlp.tools.util.model.BaseModel.loadModel(BaseModel.java:222)
      at opennlp.tools.util.model.BaseModel.<init>(BaseModel.java:181)
      at opennlp.tools.doccat.DoccatModel.<init>(DoccatModel.java:48)

      Attachments

        Activity

          People

            joern Jörn Kottmann
            shammad Saed Hammad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified