mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
* Add assertion
This commit is contained in:
parent
377e9b29b1
commit
05d6065e2e
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user