You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "William Colen (JIRA)" <ji...@apache.org> on 2014/04/11 15:27:14 UTC

[jira] [Commented] (OPENNLP-673) Doccat NGramFeatureGenerator not working

    [ https://issues.apache.org/jira/browse/OPENNLP-673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13966477#comment-13966477 ] 

William Colen commented on OPENNLP-673:
---------------------------------------

The issue is caused by the feature generator events with missing predicates. The event should have the format:
<pred>=<instance>

For example:

ng=hello,world

> Doccat NGramFeatureGenerator not working
> ----------------------------------------
>
>                 Key: OPENNLP-673
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-673
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Doccat
>    Affects Versions: 1.6.0
>            Reporter: William Colen
>            Assignee: William Colen
>
> Training a document categorizer module using NGramFeatureGenerator always fails. All events are dropped.
> (...)
> Dropped event talk.religion.misc:[From:,  (...)
> Dropped event talk.religion.misc:[From:, (...)
> done.
> Sorting and merging events... 
> Exception in thread "main" java.lang.NullPointerException
> 	at opennlp.tools.ml.maxent.GISTrainer.trainModel(GISTrainer.java:264)
> 	at opennlp.tools.ml.maxent.GIS.trainModel(GIS.java:298)
> 	at opennlp.tools.ml.maxent.GIS.doTrain(GIS.java:83)
> 	at opennlp.tools.ml.maxent.GIS.doTrain(GIS.java:1)
> 	at opennlp.tools.ml.AbstractEventTrainer.train(AbstractEventTrainer.java:93)
> 	at opennlp.tools.ml.model.TrainUtil.train(TrainUtil.java:53)
> 	at opennlp.tools.doccat.DocumentCategorizerME.train(DocumentCategorizerME.java:116)
> 	at opennlp.tools.doccat.DoccatCrossValidator.evaluate(DoccatCrossValidator.java:72)
> 	at opennlp.tools.cmdline.doccat.DoccatCrossValidatorTool.run(DoccatCrossValidatorTool.java:99)
> 	at opennlp.tools.cmdline.CLI.main(CLI.java:224)
> Done indexing.
> Incorporating indexed data for training...  



--
This message was sent by Atlassian JIRA
(v6.2#6252)