From 4010b9b6d9eef7cbd136d0efaa357687271dabb3 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 27 May 2015 03:18:50 +0200 Subject: [PATCH] * Pass parameter for regularization in parser.pyx --- spacy/syntax/parser.pyx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spacy/syntax/parser.pyx b/spacy/syntax/parser.pyx index 5502f224b..1cd7d6c0d 100644 --- a/spacy/syntax/parser.pyx +++ b/spacy/syntax/parser.pyx @@ -87,7 +87,7 @@ cdef class GreedyParser: cdef Transition guess while not is_final(state): fill_context(context, state) - scores = self.model.score(context) + scores = self.model.score(context, False) guess = self.moves.best_valid(scores, state) guess.do(&guess, state) self.moves.finalize_state(state) @@ -111,12 +111,9 @@ cdef class GreedyParser: while not is_final(state): fill_context(context, state) - scores = self.model.score(context) + scores = self.model.score(context, True) guess = self.moves.best_valid(scores, state) best = self.moves.best_gold(scores, state, gold) - #print self.moves.move_name(guess.move, guess.label), - #print self.moves.move_name(best.move, best.label), - #print print_state(state, py_words) cost = guess.get_cost(&guess, state, gold) self.model.update(context, guess.clas, best.clas, cost)