* Add assertion

This commit is contained in:
Matthew Honnibal 2015-03-23 15:34:45 +01:00
parent 377e9b29b1
commit 05d6065e2e

View File

@ -114,6 +114,7 @@ cdef class GreedyParser:
guess = self.moves.best_valid(scores, state) guess = self.moves.best_valid(scores, state)
best = self.moves.best_gold(scores, state, gold) best = self.moves.best_gold(scores, state, gold)
cost = guess.get_cost(&guess, state, gold) cost = guess.get_cost(&guess, state, gold)
assert cost < 9000
self.model.update(context, guess.clas, best.clas, cost) self.model.update(context, guess.clas, best.clas, cost)
if force_gold: if force_gold: