I know there has been already many discussions about this issue on SO but none of them solve my problem. I have a file test.txt
and I want to do some sentiment analysis on it. The format of the input file in one sentence per line. And I run the tool with following command:
java -cp "../*" -mx1g edu.stanford.nlp.sentiment.SentimentPipeline -file test.txt
And it began to run and print the content of my file in a strange way. After a while, it throws this error:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
I also tried:
java -Xms1024m -Xmx2048m -cp "../*" -mx1g edu.stanford.nlp.sentiment.SentimentPipeline -file test.txt
But it still didn't work. BTW, I run the tool in command line instead of eclipse. So I think it is not about eclipse. Could you please help me with this issue? Thanks in advance!