while training with the opennlp training api command getting java heap space error:

戏子无情 提交于 2019-12-11 03:38:09

问题


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.

来源:https://stackoverflow.com/questions/31337671/while-training-with-the-opennlp-training-api-command-getting-java-heap-space-err

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!