From 05d6065e2e666a6104be362ba26f5126ff7bcffa Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 23 Mar 2015 15:34:45 +0100 Subject: [PATCH] * Add assertion --- spacy/syntax/parser.pyx | 1 + 1 file changed, 1 insertion(+) diff --git a/spacy/syntax/parser.pyx b/spacy/syntax/parser.pyx index 4a925dd8c..e93249362 100644 --- a/spacy/syntax/parser.pyx +++ b/spacy/syntax/parser.pyx @@ -114,6 +114,7 @@ cdef class GreedyParser: guess = self.moves.best_valid(scores, state) best = self.moves.best_gold(scores, state, gold) cost = guess.get_cost(&guess, state, gold) + assert cost < 9000 self.model.update(context, guess.clas, best.clas, cost) if force_gold: