我想在斯坦福依赖解析器我的手。我试图在Windows上提取使用此命令的依赖性从命令行运行解析器:
java -mx100m -cp "stanford-parser.jar" edu.stanford.nlp.trees.EnglishGrammaticalStructure -sentFile english-onesent.txt -collapsedTree -CCprocessed -parserFile englishPCFG.ser.gz
我收到以下错误:
Error occurred during initialization of VM
Too small initial heap
我改变了内存大小-mx1024,-mx2048以及-mx4096。它并没有改变任何东西,错误仍然存在。
我在想什么?
键入-Xmx1024m
的-mx1024
代替。
见https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html
它应该是-mx1024m。我跳过米
还有一两件事:在-cp,模型罐子也应包括在内。
... -cp "stanford-parser.jar;stanford-parser-3.5.2-models.jar"...
(假设你使用的是最新版本)。
否则,一个IO异常将被抛出。
可能有一些观点认为在IDE中已经存在。在日食:进入TO->运行原样>运行配置 - >参数,然后删除先前被使用的参数。重新启动蚀。为我工作!