You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Joern Kottmann (JIRA)" <ji...@apache.org> on 2014/02/24 10:10:20 UTC

[jira] [Closed] (OPENNLP-649) Loading trained model (DoccatModel) throws exception

     [ https://issues.apache.org/jira/browse/OPENNLP-649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joern Kottmann closed OPENNLP-649.
----------------------------------

    Resolution: Not A Problem
      Assignee: Joern Kottmann

The issue was caused by coping resource files incorrectly.

> Loading trained model (DoccatModel) throws exception 
> -----------------------------------------------------
>
>                 Key: OPENNLP-649
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-649
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Doccat
>    Affects Versions: tools-1.5.3
>            Reporter: Saed Hammad
>            Assignee: Joern Kottmann
>            Priority: Critical
>              Labels: doccat, loading, model
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)