From 3feb52374c6d6d4aae2170be3e2c24dfb056cf0c Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 27 Mar 2015 15:21:38 +0100 Subject: [PATCH] * Break apart a condition, for ease of debug printing --- spacy/syntax/transition_system.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/syntax/transition_system.pyx b/spacy/syntax/transition_system.pyx index 820b61426..e948d483d 100644 --- a/spacy/syntax/transition_system.pyx +++ b/spacy/syntax/transition_system.pyx @@ -47,7 +47,8 @@ cdef class TransitionSystem: cdef weight_t score = MIN_SCORE cdef int i for i in range(self.n_moves): - if scores[i] > score and self.c[i].get_cost(&self.c[i], s, gold) == 0: + cost = self.c[i].get_cost(&self.c[i], s, gold) + if scores[i] > score and cost == 0: best = self.c[i] score = scores[i] assert score > MIN_SCORE