Free anything we can to reduce memory footprint after a format(). keep analysis, testDoc as they are used for results.
()
| 109 | * keep analysis, testDoc as they are used for results. |
| 110 | */ |
| 111 | public void releaseMemory() { |
| 112 | corpus = null; |
| 113 | realTokens = null; |
| 114 | originalTokens = null; |
| 115 | tokenToNodeMap = null; |
| 116 | originalTokenToNodeMap = null; |
| 117 | tokenToListInfo = null; |
| 118 | wsClassifier = null; |
| 119 | hposClassifier = null; |
| 120 | } |
| 121 | |
| 122 | /** Format the document. Does not affect/alter doc. */ |
| 123 | public String format(InputDocument doc, boolean collectAnalysis) throws Exception { |