Dependency Parser 失败的示例

Examples where Dependency Parser fails

任何人都可以告诉我什么时候依赖解析器失败,失败的原因以及解决方法是什么吗?

考虑下面的句子:

Sands had already begun to trickle into the bottom.

Tree: (ROOT (S (NP (NNP Sands)) (VP (VBD had) (ADVP (RB already)) (VP (VBN begun) (S (VP (TO to) (VP (VB trickle) (PP (IN into) (NP (DT the) (NN bottom)))))))) (. .)))

dependency parser: [nsubj(begun-4, Sands-1), nsubj:xsubj(trickle-6, Sands-1), aux(begun-4, had-2), advmod(begun-4, already-3), root(ROOT-0, begun-4), mark(trickle-6, to-5), xcomp(begun-4, trickle-6), case(bottom-9, into-7), det(bottom-9, the-8), nmod:into(trickle-6, bottom-9), punct(begun-4, .-10)]

依赖解析器失败的原因可能有两个。

1) 这里单词 "Sands" 是专有名词复数 (NNPS) 但 POS 标注器输出给出的 NNP 是专有名词,因此标注器中存在错误,该错误又传播到依赖项解析器,因为它使用 POS 来生成依赖项”。 要处理这种情况,您可以使用它失败的句子训练词性标注器。

2) 句子的上下文对于依赖解析器来说可能是全新的,因为大多数解析器(如 spacy 、 stanford 、 nltk 等)都是经过训练的 ML 模型,因此为了处理这种情况,您可以单独训练依赖解析器有新句子。

你可以参考这个 link 来了解如何训练词性标注器和依赖解析器: https://spacy.io/usage/training#section-tagger-parser

希望它能回答您的问题。