package src;
import java.util.Properties;
import edu.stanford.nlp.pipeline.StanfordCoreNLP;
public class NLPTest {
public static void main(String[] args){
Properties props = new Properties();
props.put("annotators", "tokenize, ssplit, pos, lemma, ner, parse, dcoref");
StanfordCoreNLP coreNLP = new StanfordCoreNLP(props);
}
}
我在我的 Eclipse 中运行了这个示例代码,但它给出了以下错误:Loading classifier from edu/stanford/nlp/models/ner/english.all.3class.dissim.crf.ser.gz ... Exception in thread "main" java .lang.OutOfMemoryError:Java 堆空间
虽然当我从 Command Propmt 运行 Stanford CoreNLP 时一切正常。谁能告诉我解决方案?它与 Eclipse 的内存分配有关吗?