mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
* Remove debug word list
This commit is contained in:
parent
8f7eeb1c2d
commit
b9b695fb1b
|
@ -107,13 +107,13 @@ cdef class GreedyParser:
|
||||||
cdef Pool mem = Pool()
|
cdef Pool mem = Pool()
|
||||||
cdef State* state = new_state(mem, tokens.data, tokens.length)
|
cdef State* state = new_state(mem, tokens.data, tokens.length)
|
||||||
self.moves.first_state(state)
|
self.moves.first_state(state)
|
||||||
py_words = [t.orth_ for t in tokens]
|
|
||||||
while not is_final(state):
|
while not is_final(state):
|
||||||
fill_context(context, state)
|
fill_context(context, state)
|
||||||
scores = self.model.score(context)
|
scores = self.model.score(context)
|
||||||
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)
|
||||||
|
|
||||||
self.model.update(context, guess.clas, best.clas, cost)
|
self.model.update(context, guess.clas, best.clas, cost)
|
||||||
if force_gold:
|
if force_gold:
|
||||||
best.do(&best, state)
|
best.do(&best, state)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user