From 76a1f0481a49c1826ddaeb9c008e5d7e5d8fd766 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 8 Aug 2015 23:31:54 +0200 Subject: [PATCH] * Whitespace --- spacy/syntax/arc_eager.pyx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spacy/syntax/arc_eager.pyx b/spacy/syntax/arc_eager.pyx index b297140ba..441c3df22 100644 --- a/spacy/syntax/arc_eager.pyx +++ b/spacy/syntax/arc_eager.pyx @@ -267,7 +267,7 @@ cdef class Break: return cost else: return cost + 1 - + @staticmethod cdef inline int label_cost(StateClass s, const GoldParseC* gold, int label) nogil: return 0 @@ -279,7 +279,7 @@ cdef int _get_root(int word, const GoldParseC* gold) nogil: return -1 else: return word - + cdef class ArcEager(TransitionSystem): @classmethod @@ -322,8 +322,9 @@ cdef class ArcEager(TransitionSystem): cdef Transition lookup_transition(self, object name) except *: if '-' in name: move_str, label_str = name.split('-', 1) - label = self.label_ids[label_str] + label = self.strings[label_str] else: + move_str = name label = 0 move = MOVE_NAMES.index(move_str) for i in range(self.n_moves):