2016-06-29 8 views
0

Ich arbeite an Java-Projekt, und ich benutze standford corenlp http://stanfordnlp.github.io/CoreNLP/ Bibliothek darin.Sutime/Englisch.sutime.txt dauert viel Ladezeit von Runnable Jar

Ich habe sie als Referenzbibliothek hinzugefügt und auch einige maven-Abhängigkeit hinzugefügt. Ich habe das ganze Projekt mit Eclipse eingerichtet.

Jetzt schaffe ich runnable jar für dieses Projekt, aber wenn ich das Glas ausführen dauert es viel Zeit Bibliothek english.sutime.txt auszuführen, wie folgt,

[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize 
[main] INFO edu.stanford.nlp.pipeline.TokenizerAnnotator - TokenizerAnnotator: No tokenizer type provided. Defaulting to PTBTokenizer. 
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit 
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator pos 
Reading POS tagger model from edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger ... done [1.4 sec]. 
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator lemma 
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ner 
Loading classifier from edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz ... done [1.9 sec]. 
Loading classifier from edu/stanford/nlp/models/ner/english.muc.7class.distsim.crf.ser.gz ... done [2.0 sec]. 
Loading classifier from edu/stanford/nlp/models/ner/english.conll.4class.distsim.crf.ser.gz ... done [2.6 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. 
Reading TokensRegex rules from edu/stanford/nlp/models/sutime/defs.sutime.txt 
Jun 29, 2016 6:37:39 PM edu.stanford.nlp.ling.tokensregex.CoreMapExpressionExtractor appendRules 
INFO: Read 83 rules 
Reading TokensRegex rules from edu/stanford/nlp/models/sutime/english.sutime.txt 


Jun 29, 2016 6:58:03 PM edu.stanford.nlp.ling.tokensregex.CoreMapExpressionExtractor appendRules 
INFO: Read 25 rules 
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator parse 
[main] INFO edu.stanford.nlp.parser.common.ParserGrammar - Loading parser from serialized file edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ... 
done [3.1 sec]. 

So nach english.sutime.txt I muss auf weiteren Prozess ca. 15 Minuten warten. Aber Projektausführung in Eclipse nimmt nicht so viel Zeit in Anspruch.

Kann mir jemand helfen, dies zu lösen? Mein lauffähiges Jar enthält alle Abhängigkeiten darin.

Danke, Priyank

Antwort

0

Während die runnable JAR-Datei in Eclipse erstellen, wählen Sie "Extract benötigten Bibliotheken in generierten jar" anstelle von "Package benötigten Bibliotheken in generierten jar".

Verwandte Themen