斯坦福大学nlp 3.7.0和3.9.2之间的性能下降

时间:2019-02-01 10:13:33

标签: stanford-nlp

斯坦福nlp版本3.7.0和3.9.2在Java中似乎有性能下降。

我正在运行以下管道

props.put("annotators", "tokenize, ssplit, pos, ner, parse, sentiment");

以及以下属性

props.put("ner.model",
            "edu/stanford/nlp/models    /ner/english.all.3class.distsim.crf.ser.gz");
props.put("ner.useSUTime", "false");
props.put("ner.applyNumericClassifiers", "false");

当我从版本3.7.0升级到3.9.2时,我看到CPU峰值和性能下降。暂时没有数字,但似乎慢了5倍。

我正在解析少量文本。小新闻网站文章。

也许我应该使用其他模型? 还有其他人注意到吗?

编辑: 我注意到3.9.2版本会加载RegexNERAnnotator的模型数据,但3.7.0不会加载(在日志中看到),不确定是否会产生影响。

1 个答案:

答案 0 :(得分:1)

是的,原因是默认情况下现在运行基于规则的NER。

如果您不希望使用细粒度的命名实体,可以使用

将其停用

return this.http.get<Weather>(this.serviceUrl, httpOptions);