From 8fce187de430f86861da1808dd47b72bf2bbd513 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 1 Aug 2017 22:10:05 +0200 Subject: [PATCH] Fix ArcEager for missing values --- spacy/syntax/arc_eager.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/syntax/arc_eager.pyx b/spacy/syntax/arc_eager.pyx index d4367c6df..29e8de0aa 100644 --- a/spacy/syntax/arc_eager.pyx +++ b/spacy/syntax/arc_eager.pyx @@ -362,7 +362,7 @@ cdef class ArcEager(TransitionSystem): if not self.has_gold(gold): return None for i in range(gold.length): - if gold.heads[i] is None: # Missing values + if gold.heads[i] is None or gold.labels[i] is None: # Missing values gold.c.heads[i] = i gold.c.has_dep[i] = False else: