我从http://nlp.stanford.edu/software//stanford-corenlp-full-2015-12-09.zip下载了Stanford coreNLP并将其解压到我的R库目录中。我在使用 initCoreNLP() 初始化它时得到了这个:
initCoreNLP() [主要] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - 搜索资源:StanfordCoreNLP.properties [主要] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - 添加注释器 tokenize [主要] 信息 edu.stanford.nlp.pipeline.TokenizerAnnotator - TokenizerAnnotator:未提供标记器类型。默认为 PTBTokenizer。 [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - 添加注释器 ssplit [主要] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - 添加注释器 pos 从 edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger 读取 POS 标注器模型...完成 [0,4 秒]。 [主要] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - 添加注释器引理 [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - 添加注释器 从 edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz 加载分类器...完成 [0,7 秒]。 从 edu/stanford/nlp/models/ner/english.muc.7class.distsim.crf.ser.gz 加载分类器...完成 [0,3 秒]。 从 edu/stanford/nlp/models/ner/english.conll.4class.distsim.crf.ser.gz 加载分类器...完成 [0,3 秒]。 [主要] INFO edu.stanford.nlp.time.JollyDayHolidays - 从类路径 edu/stanford/nlp/models/sutime/jollyday/Holidays_sutime.xml 初始化 SUTime 的 JollyDayHoliday 作为 sutime.binder.1。 initCoreNLP() 中的错误: edu.stanford.nlp.util.ReflectionLoading$ReflectionLoadingException:创建 edu.stanford.nlp.time.TimeExpressionExtractorImpl 时出错
有人可以帮助修复我的 coreNLP 配置吗?
我尝试了几个 coreNLP 版本。
这个问题已经解决了。运行时存在内存开销
initCoreNLP() 命令。此处提供了 Mac 解决方法无法在 R 中初始化 CoreNLP
继续之前,请确保您的系统上安装了 Java 8。适应 debian 的解决方法产生以下步骤:
选项(java.parameters =“-XX:-UseGCOverheadLimit”)
dyn.load('/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so')
initCoreNLP()
最后,请记住,你仍然没有摆脱麻烦。鉴于您的硬件设置和数据集的大小,Java 开销问题警告消息可能仍会弹出。