初始堆错误太小-斯坦福解析器

Vip*_*per 5 stanford-nlp

我正在尝试使用Stanford依赖解析器。我尝试使用以下命令从Windows上的命令行运行解析器以提取依赖项:

java -mx100m -cp "stanford-parser.jar" edu.stanford.nlp.trees.EnglishGrammaticalStructure -sentFile english-onesent.txt -collapsedTree -CCprocessed -parserFile englishPCFG.ser.gz
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Error occurred during initialization of VM  
Too small initial heap
Run Code Online (Sandbox Code Playgroud)

我将内存大小更改为-mx1024,-mx2048以及-mx4096。它没有任何改变,错误仍然存​​在。

我想念什么?

Vip*_*per 6

它应该是-mx1024 m。我跳过

还有一件事:-cp中还应包含模型jar。

... -cp "stanford-parser.jar;stanford-parser-3.5.2-models.jar"...
Run Code Online (Sandbox Code Playgroud)

(假设您使用的是最新版本)。

否则将引发IO异常。