From 70bcc1f48e7f83e1cbfb853a38de9ed025d3eccd Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 25 Jan 2021 19:17:41 +1100 Subject: [PATCH] Upd parser --- spacy/pipeline/transition_parser.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/pipeline/transition_parser.pyx b/spacy/pipeline/transition_parser.pyx index 3c5e5e9f9..36588f5e8 100644 --- a/spacy/pipeline/transition_parser.pyx +++ b/spacy/pipeline/transition_parser.pyx @@ -604,6 +604,8 @@ cdef class Parser(TrainablePipe): for state, eg, history in zip(all_states, examples, oracle_histories): if not history: continue + if not self.moves.has_gold(eg): + continue gold = self.moves.init_gold(state, eg) if len(history) < max_length: states.append(state)