我使用 MALLET 进行主题建模。
http://mallet.cs.umass.edu/topics.php
首先,我尝试按照说明导入训练文档集。
bin/mallet import-dir --input /data/topic-input --output topic-input.mallet --keep-sequence --remove-stopwords
我总是得到OutOfMemoryError
,尽管我"bin/mallet.bat"
根据下一页进行了更改。
木槌主题建模
我设置set MALLET_MEMORY=32G
。
我的数据集大小是 30GB。
电脑内存够用。
我收到以下错误。
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Arrays.java:3658)
at java.lang.String.<init>(String.java:201)
at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:909)
at java.lang.StringBuffer.subSequence(StringBuffer.java:473)
at cc.mallet.extract.StringSpan.constructTokenText(StringSpan.java:49)
at cc.mallet.extract.StringSpan.<init>(StringSpan.java:33)
at cc.mallet.pipe.CharSequence2TokenSequence.pipe(CharSequence2TokenSequence.java:68)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:294)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:282)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:290)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:282)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:290)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:282)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:290)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:282)
at cc.mallet.types.InstanceList.addThruPipe(InstanceList.java:267)
at cc.mallet.classify.tui.Text2Vectors.main(Text2Vectors.java:312)
$ bin/mallet import-dir --input ../Text --output topic-input.mallet --keep-sequence --remove-stopwords
Labels =
../Text
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:3658)
at java.lang.String.<init>(String.java:201)
at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:909)
at java.lang.StringBuffer.subSequence(StringBuffer.java:473)
at cc.mallet.extract.StringSpan.constructTokenText(StringSpan.java:49)
at cc.mallet.extract.StringSpan.<init>(StringSpan.java:33)
at cc.mallet.pipe.CharSequence2TokenSequence.pipe(CharSequence2TokenSequence.java:68)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:294)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:282)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:290)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:282)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:290)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:282)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:290)
at cc.mallet.pipe.Pipe$SimplePipeInstanceIterator.next(Pipe.java:282)
at cc.mallet.types.InstanceList.addThruPipe(InstanceList.java:267)
at cc.mallet.classify.tui.Text2Vectors.main(Text2Vectors.java:312)
我该如何解决这个问题?谢谢你。