* Fix cost calculation on non-monotonic oracle

This commit is contained in:
Matthew Honnibal 2016-05-03 00:21:08 +02:00
parent 377a624046
commit 1f1532142f
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ cdef class LeftArc:
for i in range(1, s.stack_depth()): for i in range(1, s.stack_depth()):
cost += gold.heads[s.S(i)] == s.S(0) cost += gold.heads[s.S(i)] == s.S(0)
cost += gold.heads[s.S(0)] == s.S(i) cost += gold.heads[s.S(0)] == s.S(i)
return pop_cost(s, gold, s.S(0)) + arc_cost(s, gold, s.B(0), s.S(0)) return cost + pop_cost(s, gold, s.S(0)) + arc_cost(s, gold, s.B(0), s.S(0))
@staticmethod @staticmethod
cdef inline weight_t label_cost(StateClass s, const GoldParseC* gold, int label) nogil: cdef inline weight_t label_cost(StateClass s, const GoldParseC* gold, int label) nogil: