斯坦福NLP差异 3.9.2 -> 4.0.0 changeLG



更改为UDv2标记化("新"LDC Treebank,用于英语(; 处理多字令牌; 改进了基于 UDv2 的标记器和解析器,适用于英语、法语、德语、西班牙语; 新的法语 NER;新的中文分割器;库更新、错误修复https://stanfordnlp.github.io/CoreNLP/history.html

CoreNLP 4 中的重大变化:没有 LDC 风格的令牌转义(不再使用 -LRB-(,将英语标记化更改为"新"LDC 树库和 UD(主要是拆分连字符(,使用 UDv2 依赖项和 POS 用于英语、法语、德语和西班牙语(有 obj 和 obl(https://twitter.com/stanfordnlp/status/1252657192764796928

有人可以在界面和功能级别提供详细/信息丰富/可用的更改摘要吗?如果它有助于缩小范围:

英文模特

注解要求((

CoreAnnotations.TextAnnotation.class
CoreAnnotations.TokensAnnotation.class
CoreAnnotations.SentencesAnnotation.class
CoreAnnotations.PartOfSpeechAnnotation.class
CoreAnnotations.LemmaAnnotation.class
CoreAnnotations.NamedEntityTagAnnotation.class
CoreAnnotations.NormalizedNamedEntityTagAnnotation.class
CoreAnnotations.CanonicalEntityMentionIndexAnnotation.class
CorefCoreAnnotations.CorefChainAnnotation.class
SemanticGraphCoreAnnotations.BasicDependenciesAnnotation.class
CoreAnnotations.QuotationsAnnotation.class

管道属性

props.setProperty("coref.algorithm", "statistical");
props.setProperty("coref.maxMentionDistance", "15");
props.setProperty("coref.maxMentionDistanceWithStringMatch", "50");
props.setProperty("coref.statisical.pairwiseScoreThresholds", ".15");
props.setProperty("pos.maxlen", "70");
props.setProperty("ner.maxlen", "70");
props.setProperty("ner.applyFineGrained", "false");
props.setProperty("ner.useSUTime", "true");
props.setProperty("ner.applyNumericClassifiers", "true");
props.setProperty("ner.combinationMode", "NORMAL");
props.setProperty("ner.additional.regexner.mapping", "regexner.txt");
props.setProperty("quote.maxLength", "70");
props.setProperty("quote.singleQuotes", "true");
props.setProperty("quote.asciiQuotes", "true");
props.setProperty("quote.attributeQuotes", "true");
props.setProperty("enforceRequirements", "true");
props.setProperty("parse.model", "edu/stanford/nlp/models/srparser/englishSR.ser.gz");
props.setProperty("parse.maxlen", "70");

首先,我们不能诚实地说CoreNLP严格使用了语义版本控制。如果你愿意的话,可以称它为"印象派版本控制"。

也就是说,我们绝对决定迁移到 v4,以反映升级将破坏大多数用户的下游代码这一事实。

然而,NLP软件的情况很微妙。API 中没有大的更改,虽然属性中有一些更改,例如分词器,但大多数属性也没有更改,并且您上面的所有属性看起来都很好。事实上,如果你的下游管道与细节无关,比如全ML管道,CoreNLP 4.0可能不会破坏任何东西,你可以把它插入进来。

但是,对于大多数人来说,他们会对标记化的细节或词性、依赖项等的分类法做出假设,然后肯定需要更改代码。

例如,如果您现有的代码假定了英语标记化的细节,例如括号将被呈现为"-LRB-","-RRB-"或引号将转换为ASCII序列,如"",那么您的代码将需要更改。如果您假设您的西班牙语标记器/解析器将提供"简化的 AnCora"词性标签集而不是 UD 标签集,那么您的代码将需要更改。如果您假设在依赖项分析中依赖项"dobj"将标记直接对象(UDv1(,那么您将需要更新一些模式或其他内容来查找"obj"(UDv2(。等。

这里有一组更详细的发行说明:https://github.com/stanfordnlp/CoreNLP/releases/tag/v4.0.0 。但是没有所有变化的精确记录。除了GitHub的历史。

最新更新