while training with the opennlp training api comma

2019-07-15 04:13发布

I am using opennlp training api as shown below:

Blockquote opennlp DoccatTrainer -model en-doccat.bin -lang en -data Task_notes_1new.train -encoding ISO-8859-1 Blockquote this api creates a model named en-doccat.bin from the training dataset Task_notes_1new.train.

while training with the above command getting following error:

    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at opennlp.maxent.GISTrainer.trainModel(GISTrainer.java:301)
    at opennlp.maxent.GIS.trainModel(GIS.java:256)
    at opennlp.model.TrainUtil.train(TrainUtil.java:184)
    at opennlp.tools.doccat.DocumentCategorizerME.train(DocumentCategorizerME.java:162)
    at opennlp.tools.cmdline.doccat.DoccatTrainerTool.run(DoccatTrainerTool.java:61)
    at opennlp.tools.cmdline.CLI.main(CLI.java:222)

I even tried increasing the heap size upto 4GB, still the error remains the same.

0条回答
登录 后发表回答