title: Getting OOM while using GATE on large data set
body: <p>I am quite new to NLP and am using GATE for it. I am getting OOM Exception if I run my code for large data set(containing 7K+ records). Below is the code where exception occurs.</p>
  
  <pre><code>    /**
   * Run ANNIE
   * 
   * @param controller
   * @throws GateException
   */
  public void execute(SerialAnalyserController controller)
          throws GateException {
      TestLogger.info("Running ANNIE...");
      controller.execute();     /**** GateProcessor.java:217 ***/
  
      // controller.cleanup();
      TestLogger.info("...ANNIE complete");
  }
  </code></pre>
  
  <p>Here is the log :</p>
  
  <pre><code>    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
  at java.util.HashMap.addEntry(Unknown Source)
  at java.util.HashMap.put(Unknown Source)
  at java.util.HashMap.putAll(Unknown Source)
  at gate.annotation.AnnotationSetImpl.&lt;init&gt;(AnnotationSetImpl.java:111)
  at gate.jape.SinglePhaseTransducer.attemptAdvance(SinglePhaseTransducer.java:448)
  at gate.jape.SinglePhaseTransducer.transduce(SinglePhaseTransducer.java:287)
  at gate.jape.MultiPhaseTransducer.transduce(MultiPhaseTransducer.java:168)
  at gate.jape.Batch.transduce(Batch.java:352)
  at gate.creole.Transducer.execute(Transducer.java:116)
  at gate.creole.SerialController.runComponent(SerialController.java:177)
  at gate.creole.SerialController.executeImpl(SerialController.java:136)
  at gate.creole.SerialAnalyserController.executeImpl(SerialAnalyserController.java:67)
  at gate.creole.AbstractController.execute(AbstractController.java:42)
  at in.co.test.GateProcessor.execute(GateProcessor.java:217)
  </code></pre>
  
  <p>I would like to know what exactly is happening with execute function and how it can be resolved. Thanks.</p>