From 05050210f3c9e23d382e630f73147e9b596f0569 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 27 Jan 2021 13:04:47 +1100 Subject: [PATCH] Dont add labels implicitly for parser --- spacy/pipeline/dep_parser.pyx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spacy/pipeline/dep_parser.pyx b/spacy/pipeline/dep_parser.pyx index 18c9fd25a..063b4c04f 100644 --- a/spacy/pipeline/dep_parser.pyx +++ b/spacy/pipeline/dep_parser.pyx @@ -277,3 +277,10 @@ cdef class DependencyParser(Parser): head_scores.append(score_head_dict) label_scores.append(score_label_dict) return head_scores, label_scores + + def _ensure_labels_are_added(self, docs): + # This gives the parser a chance to add labels it's missing for a batch + # of documents. However, this isn't desirable for the dependency parser, + # because we instead have a label frequency cut-off and back off rare + # labels to 'dep'. + pass