title: Executing stanford corenlp coreference resolution
body: <p>I am trying to execute stanford corenlp package to get coreference resolution. </p>
  
  <p>Here is the command given for coref execution:</p>
  
  <pre><code>java -cp &lt;jars_in_corenlp&gt; -Xmx8g edu.stanford.nlp.dcoref.SieveCoreferenceSystem -props &lt;properties file&gt;
  </code></pre>
  
  <p>I executed like this -</p>
  
  <pre><code>java - cp "*" -Xmx2g edu.stanford.nlp.dcoref.SieveCoreferenceSystem -props annotators = pos, lemma, ner, parse dcoref.postprocessing = true dcoref.maxdist = -1 -file input.txt
  
  java - cp "*" -Xmx2g edu.stanford.nlp.dcoref.SieveCoreferenceSystem -props annotators = pos, lemma, ner, parse dcoref.postprocessing = true dcoref.maxdist = -1 input.txt
  </code></pre>
  
  <p>gives error -</p>
  
  <pre><code>Error: Could not create the Java Virtual Machine.
  Error: A fatal exception has occurred. Program will exit.
  </code></pre>
  
  <p>This way it works, but it loads all <code>jar</code> files, which takes additional time, I want to execute with minimal execution time.</p>
  
  <pre><code>java -cp "*" -Xmx2g edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma,ner,parse,dcoref -file input.txt
  </code></pre>