louismullie / stanford-core-nlp

Ruby bindings to the Stanford Core NLP tools (English, French, German).
Other
433 stars 70 forks source link

OutOfMemoryError: Java heap space #53

Open psychoslave opened 6 years ago

psychoslave commented 6 years ago

Following https://github.com/louismullie/stanford-core-nlp/issues/52 this is an other configuration issue on Fedora 27.

Even after modifying StanfordCoreNLP.jvm_args trying to run a full pipeline will raise a java heap out of memory error.


[30] pry(main)> StanfordCoreNLP.jvm_args
=> ["-Xms512M", "-Xmx1024M"]

[31] pry(main)> StanfordCoreNLP.jvm_args = ["-Xms2048M", "-Xmx1024M"]                                                                  
=> ["-Xms2048M", "-Xmx1024M"]    

[34] pry(main)> pipeline =  StanfordCoreNLP.load(:tokenize, :ssplit, :pos, :lemma, :parse, :ner, :dcoref)                              
Adding annotator tokenize        
Adding annotator ssplit
Adding annotator pos
Loading default properties from tagger /home/psychoslave/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/stanford-core-nlp-0.5.3/bin/mod
els/taggers/french.tagger
Reading POS tagger model from /home/psychoslave/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/stanford-core-nlp-0.5.3/bin/models/tagge
rs/french.tagger ... OutOfMemoryError: Java heap space
from /home/psychoslave/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/stanford-core-nlp-0.5.3/lib/stanford-core-nlp.rb:187:in `method_missing'