From e9d1e6d66bd46c0fb1c69eb452e0a32ad2b07fff Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 3 Apr 2018 02:32:09 +0200 Subject: [PATCH] Fix head alignment for split tokens --- spacy/gold.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/gold.pyx b/spacy/gold.pyx index fc862370b..c679ade35 100644 --- a/spacy/gold.pyx +++ b/spacy/gold.pyx @@ -472,7 +472,7 @@ cdef class GoldParse: self.heads[cand_i[-1]] = cand_head[-1] else: self.heads[cand_i[-1]] = cand_head - elif isinstance(cand_i, tuple) and isinstance(cand_head, int): + elif isinstance(cand_i, tuple) and not isinstance(cand_head, list): # We only handle one-to-many or many-to-one, not many-to-many cand_i, sub_i = cand_i if not isinstance(self.heads[cand_i], list):