스탠포드 -nlp CoreNLP v3.9.2 샘플의 Java OutOfMemoryError


0

샘플을 실행하려고하는데 오류가 발생합니다.

"main"스레드 예외 java.lang.OutOfMemoryError : Java 힙 공간

내 시스템은

  • 스탠포드 코어 렌-풀 -2018-10-05 v3.9.2
  • 자바 버전 "1.8.0_202"
  • OS Win10 Pro 10.0.17134 x64

이 .jar 파일을 stanford-corenlp-full-2018-10-05 디렉토리에 추가했습니다.

  • 스탠포드-영어 -corenlp-2018-10-05-models.jar
  • 스탠포드-영어 -kbp-corenlp-2018-10-05-models.jar

나는 명령을 사용하고 있습니다 :

java -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLP -d64 -Xmx2048m -file input.txt

아래 오류가 발생합니다.

전제 조건이 누락되었거나이 버전이 호환되지 않습니까?

감사.

[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Searching for resource: StanfordCoreNLP.properties ... found. [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP
- Adding annotator pos [main] INFO edu.stanford.nlp.tagger.maxent.MaxentTagger - Loading POS tagger from edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger ... done [1.8 sec]. [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator lemma [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ner [main] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz ... done [2.7 sec]. [main] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.muc.7class.distsim.crf.ser.gz ... done [3.2 sec]. [main] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.conll.4class.distsim.crf.ser.gz ... done [1.3 sec]. [main] INFO edu.stanford.nlp.time.JollyDayHolidays
- Initializing JollyDayHoliday for SUTime from classpath edu/stanford/nlp/models/sutime/jollyday/Holidays_sutime.xml as sutime.binder.1. [main] INFO edu.stanford.nlp.time.TimeExpressionExtractorImpl - Using following SUTime rules: edu/stanford/nlp/models/sutime/defs.sutime.txt,edu/stanford/nlp/models/sutime/english.sutime.txt,edu/stanford/nlp/models/sutime/english.holidays.sutime.txt [main] INFO edu.stanford.nlp.pipeline.TokensRegexNERAnnotator - ner.fine.regexner: Read 580704 unique entries out of 581863 from edu/stanford/nlp/models/kbp/english/gazetteers/regexner_caseless.tab, 0 TokensRegex patterns. [main] INFO edu.stanford.nlp.pipeline.TokensRegexNERAnnotator - ner.fine.regexner: Read 4869 unique entries out of 4869 from edu/stanford/nlp/models/kbp/english/gazetteers/regexner_cased.tab, 0 TokensRegex patterns. [main] INFO edu.stanford.nlp.pipeline.TokensRegexNERAnnotator - ner.fine.regexner: Read 585573 unique entries from 2 files [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator depparse [main] INFO edu.stanford.nlp.parser.nndep.DependencyParser - Loading depparse model: edu/stanford/nlp/models/parser/nndep/english_UD.gz ... Exception in thread "main" java.lang.OutOfMemoryError: Java heap space   at edu.stanford.nlp.parser.nndep.Classifier.initGradientHistories(Classifier.java:607)  at edu.stanford.nlp.parser.nndep.Classifier.<init>(Classifier.java:141)     at edu.stanford.nlp.parser.nndep.Classifier.<init>(Classifier.java:116)     at edu.stanford.nlp.parser.nndep.DependencyParser.loadModelFile(DependencyParser.java:624)  at edu.stanford.nlp.parser.nndep.DependencyParser.loadFromModelFile(DependencyParser.java:499)  at edu.stanford.nlp.pipeline.DependencyParseAnnotator.<init>(DependencyParseAnnotator.java:57)  at edu.stanford.nlp.pipeline.AnnotatorImplementations.dependencies(AnnotatorImplementations.java:240)   at edu.stanford.nlp.pipeline.StanfordCoreNLP.lambda$getNamedAnnotators$18(StanfordCoreNLP.java:536)     at edu.stanford.nlp.pipeline.StanfordCoreNLP$$Lambda$29/41903949.apply(Unknown Source)  at edu.stanford.nlp.pipeline.StanfordCoreNLP.lambda$null$30(StanfordCoreNLP.java:602)   at edu.stanford.nlp.pipeline.StanfordCoreNLP$$Lambda$38/1060830840.get(Unknown Source)  at edu.stanford.nlp.util.Lazy$3.compute(Lazy.java:126)  at edu.stanford.nlp.util.Lazy.get(Lazy.java:31)     at edu.stanford.nlp.pipeline.AnnotatorPool.get(AnnotatorPool.java:149)  at edu.stanford.nlp.pipeline.StanfordCoreNLP.<init>(StanfordCoreNLP.java:251)   at edu.stanford.nlp.pipeline.StanfordCoreNLP.<init>(StanfordCoreNLP.java:192)   at edu.stanford.nlp.pipeline.StanfordCoreNLP.<init>(StanfordCoreNLP.java:188)   at edu.stanford.nlp.pipeline.StanfordCoreNLP.main(StanfordCoreNLP.java:1388)
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.