Dont add labels implicitly for parser

This commit is contained in:
Matthew Honnibal 2021-01-27 13:04:47 +11:00
parent 1d20e21f3e
commit 05050210f3
1 changed files with 7 additions and 0 deletions

View File

@ -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